Version Notes
initial release
Download this release
Release Info
Developer | GroupDocs |
Extension | GroupDocs_Viewer_for_Java |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Gdvj/GroupdocsViewerJava/Block/Adminhtml/Cms/Page/Edit.php +62 -0
- app/code/local/Gdvj/GroupdocsViewerJava/Block/Adminhtml/GroupdocsViewerJava.php +7 -0
- app/code/local/Gdvj/GroupdocsViewerJava/Helper/Data.php +5 -0
- app/code/local/Gdvj/GroupdocsViewerJava/Model/Mysql4/GroupdocsViewerJava/Collection.php +9 -0
- app/code/local/Gdvj/GroupdocsViewerJava/Model/Mysql4/groupdocsviewerjava.php +8 -0
- app/code/local/Gdvj/GroupdocsViewerJava/Model/groupdocsviewerjava.php +9 -0
- app/code/local/Gdvj/GroupdocsViewerJava/controllers/Adminhtml/ViewerJavaController.php +45 -0
- app/code/local/Gdvj/GroupdocsViewerJava/etc/config.xml +119 -0
- app/code/local/Gdvj/GroupdocsViewerJava/js/.htaccess +2 -0
- app/code/local/Gdvj/GroupdocsViewerJava/js/insert.js +78 -0
- app/code/local/Gdvj/GroupdocsViewerJava/sql/GroupdocsViewerJava_setup/mysql4-install-0.1.0 +25 -0
- app/etc/modules/Gdvj_GroupdocsViewerJava.xml +9 -0
- package.xml +61 -0
app/code/local/Gdvj/GroupdocsViewerJava/Block/Adminhtml/Cms/Page/Edit.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script>
|
2 |
+
// Insert GroupDocs File ID at cms edit page
|
3 |
+
function gdvjfileid() {
|
4 |
+
var anchor = document.getElementsByTagName("a");
|
5 |
+
// Switch the right tab
|
6 |
+
for (var i = 0; i < anchor.length; i++) {
|
7 |
+
if (anchor[i].className.match(/tab-item-link/) || anchor[i].className.match(/tab-item-link active/)) {
|
8 |
+
if (anchor[i].title != "Content") {
|
9 |
+
anchor[i].className = "tab-item-link";
|
10 |
+
var tab1 = document.getElementById('page_tabs_main_section_content');
|
11 |
+
var tab3 = document.getElementById('page_tabs_design_section_content');
|
12 |
+
var tab4 = document.getElementById('page_tabs_meta_section_content');
|
13 |
+
tab1.style.display = 'none';
|
14 |
+
tab3.style.display = 'none';
|
15 |
+
tab4.style.display = 'none';
|
16 |
+
} else {
|
17 |
+
anchor[i].className = "tab-item-link active";
|
18 |
+
var tab2 = document.getElementById('page_tabs_content_section_content');
|
19 |
+
tab2.style.display = 'block';
|
20 |
+
var form = document.createElement('div');
|
21 |
+
form.setAttribute("id", "groupdocsviewerjava")
|
22 |
+
form.innerHTML = '<form action="#" name="form">' +
|
23 |
+
'<label for="url">URL to installed GroupDocs Viewer Java</label><br />' +
|
24 |
+
'<input type="text" name="url" value="" /><br />' +
|
25 |
+
'<label for="path">Path for default file to view (Optional)</label><br />' +
|
26 |
+
'<input type="text" name="path" value=""><br />' +
|
27 |
+
'<label for="width">Width</label><br />' +
|
28 |
+
'<input type="text" name="width" value=""><br />' +
|
29 |
+
'<label for="height">Height</label><br />' +
|
30 |
+
'<input type="text" name="height" value=""><br />' +
|
31 |
+
'<input type="button" name="doRequest" value="Add Viewer" onClick="insertViewerJava();">' +
|
32 |
+
'<input type="button" name="cancel" value="Cancel" onClick="delFormJava()">' +
|
33 |
+
'</form>' +
|
34 |
+
'<br />' +
|
35 |
+
'<a target="blank" href="http://groupdocs.com/docs/display/gendoc/FAQs">See our FAQ</a> to learn how to use Comparison.';
|
36 |
+
tab2.appendChild(form);
|
37 |
+
}
|
38 |
+
}
|
39 |
+
}
|
40 |
+
}
|
41 |
+
</script>
|
42 |
+
<?php
|
43 |
+
|
44 |
+
class Gdvj_GroupdocsViewerJava_Block_Adminhtml_Cms_Page_Edit extends Mage_Adminhtml_Block_Cms_Page_Edit {
|
45 |
+
|
46 |
+
public function __construct() {
|
47 |
+
|
48 |
+
parent::__construct();
|
49 |
+
$head = Mage::app()->getFrontController()
|
50 |
+
->getAction()
|
51 |
+
->getLayout()
|
52 |
+
->getBlock('root')
|
53 |
+
->getChild('head');
|
54 |
+
$head->addJs('../app/code/local/Gdvj/GroupdocsViewerJava/js/insert.js');
|
55 |
+
$this->_addButton('button_id', array(
|
56 |
+
'label' => Mage::helper('cms')->__('Add GroupDocs Viewer Java'),
|
57 |
+
'onclick' => 'gdvjfileid()',
|
58 |
+
'class' => 'go'
|
59 |
+
), 0, 100, 'footer', 'header');
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/local/Gdvj/GroupdocsViewerJava/Block/Adminhtml/GroupdocsViewerJava.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdvj_GroupdocsViewerJava_Block_Adminhtml_GroupdocsViewerJava extends Mage_Adminhtml_Block_Template {
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
}
|
app/code/local/Gdvj/GroupdocsViewerJava/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdvj_GroupdocsViewerJava_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
+
|
5 |
+
}
|
app/code/local/Gdvj/GroupdocsViewerJava/Model/Mysql4/GroupdocsViewerJava/Collection.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdvj_GroupdocsViewerJava_Model_Mysql4_GroupdocsViewerJava_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('groupdocsviewerjava/groupdocsviewerjava');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Gdvj/GroupdocsViewerJava/Model/Mysql4/groupdocsviewerjava.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gdvj_GroupdocsViewerJava_Model_Mysql4_GroupdocsViewerJava extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('groupdocsviewerjava/groupdocsviewerjava', 'id');
|
7 |
+
}
|
8 |
+
}
|
app/code/local/Gdvj/GroupdocsViewerJava/Model/groupdocsviewerjava.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gdvj_GroupdocsViewerJava_Model_GroupdocsViewerJava extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('groupdocsviewerjava/groupdocsviewerjava');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Gdvj/GroupdocsViewerJava/controllers/Adminhtml/ViewerJavaController.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdvj_GroupdocsViewerJava_Adminhtml_ViewerJavaController extends Mage_Adminhtml_Controller_Action
|
4 |
+
{
|
5 |
+
public $jj;
|
6 |
+
|
7 |
+
public function indexAction()
|
8 |
+
{
|
9 |
+
$this->loadLayout();
|
10 |
+
|
11 |
+
// gether data
|
12 |
+
$block = $this->getLayout()->getBlock('viewerjava');
|
13 |
+
// //on initialize la variable
|
14 |
+
// $retour = '';
|
15 |
+
// /* we are doing the query to select all elements of the pfay_test table (thanks to our model test/test and we sort them by id_pfay_test */
|
16 |
+
// $collection = Mage::getModel('groupdocsviewer/groupdocsviewer')->getCollection()
|
17 |
+
// ->setOrder('id');
|
18 |
+
//
|
19 |
+
// /* then, we check the result of the query and with the function getData() */
|
20 |
+
// foreach ($collection as $data) {
|
21 |
+
// $retour.= $data->getData('id') .' => '. $data->getData('file_id') . '<br />';
|
22 |
+
// }
|
23 |
+
// $block->setData('doc',$retour);
|
24 |
+
|
25 |
+
$this->renderLayout();
|
26 |
+
}
|
27 |
+
|
28 |
+
public function postAction()
|
29 |
+
{
|
30 |
+
$post = $this->getRequest()->getPost();
|
31 |
+
try {
|
32 |
+
if (empty($post)) {
|
33 |
+
Mage::throwException($this->__('Invalid form data.'));
|
34 |
+
}
|
35 |
+
|
36 |
+
/* here's your form processing */
|
37 |
+
|
38 |
+
$message = $this->__('Your form has been submitted successfully.');
|
39 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
40 |
+
} catch (Exception $e) {
|
41 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
42 |
+
}
|
43 |
+
$this->_redirect('*/*');
|
44 |
+
}
|
45 |
+
}
|
app/code/local/Gdvj/GroupdocsViewerJava/etc/config.xml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gdvj_GroupdocsViewerJava>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Gdvj_GroupdocsViewerJava>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
|
11 |
+
<blocks>
|
12 |
+
<adminhtml>
|
13 |
+
<rewrite>
|
14 |
+
<cms_page_edit>Gdvj_GroupdocsViewerJava_Block_Adminhtml_Cms_Page_Edit</cms_page_edit>
|
15 |
+
</rewrite>
|
16 |
+
</adminhtml>
|
17 |
+
</blocks>
|
18 |
+
|
19 |
+
|
20 |
+
<models>
|
21 |
+
<groupdocsviewerjava>
|
22 |
+
<class>Gdvj_GroupdocsViewerJava_Model</class>
|
23 |
+
<resourceModel>groupdocsviewerjava_mysql4</resourceModel>
|
24 |
+
</groupdocsviewerjava>
|
25 |
+
<groupdocsviewerjava_mysql4>
|
26 |
+
<class>Gdvj_GroupdocsViewerJava_Model_Mysql4</class>
|
27 |
+
<entities>
|
28 |
+
<groupdocsviewerjava>
|
29 |
+
<table>groupdocsvj</table>
|
30 |
+
</groupdocsviewerjava>
|
31 |
+
</entities>
|
32 |
+
</groupdocsviewerjava_mysql4>
|
33 |
+
</models>
|
34 |
+
<resources>
|
35 |
+
<groupdocsviewerjava_write>
|
36 |
+
<connection>
|
37 |
+
<use>core_write</use>
|
38 |
+
</connection>
|
39 |
+
</groupdocsviewerjava_write>
|
40 |
+
|
41 |
+
<groupdocsviewerjava_read>
|
42 |
+
<connection>
|
43 |
+
<use>core_read</use>
|
44 |
+
</connection>
|
45 |
+
</groupdocsviewerjava_read>
|
46 |
+
|
47 |
+
<groupdocsviewerjava_delete>
|
48 |
+
<connection>
|
49 |
+
<use>core_delete</use>
|
50 |
+
</connection>
|
51 |
+
</groupdocsviewerjava_delete>
|
52 |
+
</resources>
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
<blocks>
|
59 |
+
<groupdocsviewerjava>
|
60 |
+
<class>Gdvj_GroupdocsViewerJava_Block</class>
|
61 |
+
</groupdocsviewerjava>
|
62 |
+
</blocks>
|
63 |
+
<helpers>
|
64 |
+
<groupdocsviewerjava>
|
65 |
+
<class>Gdvj_GroupdocsViewerJava_Helper</class>
|
66 |
+
</groupdocsviewerjava>
|
67 |
+
</helpers>
|
68 |
+
</global>
|
69 |
+
|
70 |
+
<admin>
|
71 |
+
<routers>
|
72 |
+
<groupdocsviewerjava>
|
73 |
+
<use>admin</use>
|
74 |
+
<args>
|
75 |
+
<module>Gdvj_GroupdocsViewerJava</module>
|
76 |
+
<frontName>groupdocsviewerjava</frontName>
|
77 |
+
</args>
|
78 |
+
</groupdocsviewerjava>
|
79 |
+
</routers>
|
80 |
+
</admin>
|
81 |
+
|
82 |
+
<adminhtml>
|
83 |
+
|
84 |
+
<menu>
|
85 |
+
<catalog>
|
86 |
+
<children>
|
87 |
+
<groupdocsviewerjava_adminform translate="title" module="groupdocsviewerjava">
|
88 |
+
<title>Groupdocs Viewer Java</title>
|
89 |
+
<action>groupdocsviewerjava/adminhtml_viewerjava</action>
|
90 |
+
</groupdocsviewerjava_adminform>
|
91 |
+
</children>
|
92 |
+
</catalog>
|
93 |
+
</menu>
|
94 |
+
|
95 |
+
<acl>
|
96 |
+
<resources>
|
97 |
+
<admin>
|
98 |
+
<children>
|
99 |
+
<catalog>
|
100 |
+
<children>
|
101 |
+
<groupdocsviewerjava_adminform>
|
102 |
+
<title>Groupdocs Viewer Java</title>
|
103 |
+
</groupdocsviewerjava_adminform>
|
104 |
+
</children>
|
105 |
+
</catalog>
|
106 |
+
</children>
|
107 |
+
</admin>
|
108 |
+
</resources>
|
109 |
+
</acl>
|
110 |
+
|
111 |
+
<layout>
|
112 |
+
<updates>
|
113 |
+
<groupdocsviewerjava>
|
114 |
+
<file>groupdocsviewerjava.xml</file>
|
115 |
+
</groupdocsviewerjava>
|
116 |
+
</updates>
|
117 |
+
</layout>
|
118 |
+
</adminhtml>
|
119 |
+
</config>
|
app/code/local/Gdvj/GroupdocsViewerJava/js/.htaccess
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
order deny,allow
|
2 |
+
Allow from all
|
app/code/local/Gdvj/GroupdocsViewerJava/js/insert.js
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function insertViewerJava()
|
2 |
+
{
|
3 |
+
var form = document.forms.form;
|
4 |
+
var url = form.url.value;
|
5 |
+
var path = form.path.value;
|
6 |
+
var width = form.width.value;
|
7 |
+
var height = form.height.value;
|
8 |
+
if (url != "") {
|
9 |
+
if (width == "") {
|
10 |
+
width = "650";
|
11 |
+
}
|
12 |
+
if (height == "") {
|
13 |
+
height = "750";
|
14 |
+
}
|
15 |
+
if (url.substr(-1) != '/') {
|
16 |
+
url = url + "/";
|
17 |
+
}
|
18 |
+
var libs = "<script type='text/javascript' src='" + url + "GetJsHandler?script=libs/jquery-1.9.1.min.js'></script>" +
|
19 |
+
"<script type='text/javascript' src='" + url + "GetJsHandler?script=libs/jquery-ui-1.10.3.min.js'></script>" +
|
20 |
+
"<script type='text/javascript' src='" + url + "GetJsHandler?script=libs/knockout-2.2.1.js'></script>" +
|
21 |
+
"<script type='text/javascript' src='" + url + "GetJsHandler?script=libs/turn.min.js'></script>" +
|
22 |
+
"<script type='text/javascript' src='" + url + "GetJsHandler?script=libs/modernizr.2.6.2.Transform2d.min.js'></script>" +
|
23 |
+
"<script type='text/javascript' language='JavaScript'>" +
|
24 |
+
"if (!window.Modernizr.csstransforms){" +
|
25 |
+
"var scriptLoad = document.createElement('script');" +
|
26 |
+
"scriptLoad.setAttribute('type','text/javascript');" +
|
27 |
+
"scriptLoad.setAttribute('src', '" + url + "GetJsHandler?script=libs/turn.html4.min.js');" +
|
28 |
+
"document.getElementsByTagName('head')[0].appendChild(scriptLoad);" +
|
29 |
+
"}" +
|
30 |
+
"</script>" +
|
31 |
+
"<script type='text/javascript' src='" + url + "GetJsHandler?script=installableViewer.min.js'><\/script>" +
|
32 |
+
"<script type='text/javascript'>$.ui.groupdocsViewer.prototype.applicationPath = '" + url + "';</script>" +
|
33 |
+
"<script type='text/javascript'>$.ui.groupdocsViewer.prototype.useHttpHandlers = true;</script>" +
|
34 |
+
"<script type='text/javascript' src='" + url + "GetJsHandler?script=GroupdocsViewer.all.min.js'></script>" +
|
35 |
+
"<script type='text/javascript' language='JavaScript'>" +
|
36 |
+
"$(function() {" +
|
37 |
+
"var styleBootstrap = document.createElement('link');" +
|
38 |
+
"styleBootstrap.setAttribute('rel', 'stylesheet');" +
|
39 |
+
"styleBootstrap.setAttribute('type', 'text/css');" +
|
40 |
+
"styleBootstrap.setAttribute('href', '" + url + "GetCssHandler?script=bootstrap.css');" +
|
41 |
+
"var gdCss = document.createElement('link');" +
|
42 |
+
"gdCss.setAttribute('rel', 'stylesheet');" +
|
43 |
+
"gdCss.setAttribute('type', 'text/css');" +
|
44 |
+
"gdCss.setAttribute('href', '" + url + "GetCssHandler?script=GroupdocsViewer.all.min.css');" +
|
45 |
+
"var uiCss = document.createElement('link');" +
|
46 |
+
"uiCss.setAttribute('rel', 'stylesheet');" +
|
47 |
+
"uiCss.setAttribute('type', 'text/css');" +
|
48 |
+
"uiCss.setAttribute('href', '" + url + "GetCssHandler?script=jquery-ui-1.10.3.dialog.min.css');" +
|
49 |
+
"document.getElementsByTagName('head')[0].appendChild(styleBootstrap);" +
|
50 |
+
"document.getElementsByTagName('head')[0].appendChild(gdCss);" +
|
51 |
+
"document.getElementsByTagName('head')[0].appendChild(uiCss);" +
|
52 |
+
"var localizedStrings = null;" +
|
53 |
+
"var thumbsImageBase64Encoded = null;" +
|
54 |
+
"$('#viewerjava').groupdocsViewer({ filePath: '" + path + "', docViewerId: 'doc_viewer1', quality: 100, showHeader: true, showThumbnails: false, openThumbnails: false, initialZoom: 100," +
|
55 |
+
"zoomToFitWidth: true, zoomToFitHeight: false, backgroundColor: '', showFolderBrowser: true, showPrint: true, showDownload: true, showZoom: true, showPaging: true," +
|
56 |
+
"showViewerStyleControl: true, showSearch: true, preloadPagesCount: 0, viewerStyle: 1, supportTextSelection: true, localizedStrings: localizedStrings," +
|
57 |
+
"thumbsImageBase64Encoded: thumbsImageBase64Encoded, showDownloadErrorsInPopup: true });" +
|
58 |
+
"});" +
|
59 |
+
"</script>";
|
60 |
+
var div = '<div id="viewerjava" style="width:' + width + 'px;height:' + height + 'px;overflow:hidden;position:relative;margin-bottom:20px;background-color:gray;border:1px solid #ccc;"><span style="visibility:hidden;">GroupDocs Viewer Java</span></div>';
|
61 |
+
var tinyMceContent = tinyMCE.activeEditor.getContent();
|
62 |
+
// set content
|
63 |
+
tinyMCE.activeEditor.setContent(tinyMceContent + libs + div);
|
64 |
+
} else {
|
65 |
+
var tinyMceContent = tinyMCE.activeEditor.getContent();
|
66 |
+
// set content
|
67 |
+
|
68 |
+
tinyMCE.activeEditor.setContent(tinyMceContent + "Something wrong with entered data");
|
69 |
+
}
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
function delFormJava() {
|
74 |
+
var del = document.getElementById('page_tabs_content_section_content');
|
75 |
+
var divToDel = document.getElementById("groupdocsviewerjava");
|
76 |
+
del.removeChild(divToDel);
|
77 |
+
}
|
78 |
+
|
app/code/local/Gdvj/GroupdocsViewerJava/sql/GroupdocsViewerJava_setup/mysql4-install-0.1.0
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// draft - http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/custom_module_with_custom_database_table
|
3 |
+
$installer = $this;
|
4 |
+
|
5 |
+
$installer->startSetup();
|
6 |
+
|
7 |
+
$installer->run("
|
8 |
+
|
9 |
+
-- DROP TABLE IF EXISTS {groupdocsvj};
|
10 |
+
CREATE TABLE IF NOT EXISTS `groupdocsvj` (
|
11 |
+
`id` int(11) NOT NULL AUTO_INCREMENT,
|
12 |
+
`date_entered` datetime DEFAULT NULL,
|
13 |
+
`date_modified` datetime DEFAULT NULL,
|
14 |
+
`modified_user_id` char(36) DEFAULT NULL,
|
15 |
+
`created_by` char(36) DEFAULT NULL,
|
16 |
+
`description` text,
|
17 |
+
`active` tinyint(1) DEFAULT '1',
|
18 |
+
`url` varchar(255) DEFAULT NULL,
|
19 |
+
`path` varchar(255) DEFAULT NULL,
|
20 |
+
PRIMARY KEY (`id`)
|
21 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
22 |
+
|
23 |
+
");
|
24 |
+
|
25 |
+
$installer->endSetup();
|
app/etc/modules/Gdvj_GroupdocsViewerJava.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gdvj_GroupdocsViewerJava>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Gdvj_GroupdocsViewerJava>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>GroupDocs_Viewer_for_Java</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">GNU General Public License (GPL)</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>Powered by <a href="http://groupdocs.com/java/document-viewer-library" target="_blank">GroupDocs' Java document viewer library</a>, GroupDocs Java Viewer for Magento adds advanced document viewer features to Magento sites.</summary>
|
10 |
+
<description>Powered by <a href="http://groupdocs.com/java/document-viewer-library" target="_blank">GroupDocs' Java document viewer library</a>, GroupDocs Java Viewer for Magento adds advanced document viewer features to Magento sites.
|
11 |
+

|
12 |
+
As well as being a Java PDF viewer, the extension supports almost 50 file formats, including Microsoft Word, Excel, PowerPoint, Visio, and Outlook, OpenDocument formats, CAD graphics and raster images.
|
13 |
+

|
14 |
+
<strong>Before installing:</strong> to use this extension you need to have a license for the GroupDocs.Viewer for Java library. To get a free 30-day evaluation license, please <a href="http://groupdocs.com/corporate/contact" rel="nofollow" target="_blank">contact the sales team</a>.
|
15 |
+

|
16 |
+
<h3>Key Benefits</h3>
|
17 |
+

|
18 |
+
<ol>
|
19 |
+
<li><strong>Host documents on your domain</strong>. GroupDocs.Viewer for Java is different from the <a href="https://drupal.org/project/groupdocs_viewer" target="_blank">cloud-based viewer</a> in that it makes it possible to store and access documents from your local storage infrastructure.</li>
|
20 |
+
<li><strong>Native browser support</strong>. There is no need for Flash, Adobe Reader or any other 3rd party software installation client-side.</li>
|
21 |
+
<li><strong>High-quality display</strong>. Thanks to the <a href="http://groupdocs.com/html5-document-viewer">HTML5 document viewer</a> technology, spreadsheets, text documents, PowerPoint presentations, and other documents look as sharp as in the software that created them.</li>
|
22 |
+
<li><strong>Easy copy and paste</strong>. Native text rendering allows users to search for, select and copy text to the clipboard from documents embedded in the site with GroupDocs Java Viewer for Magento.</li>
|
23 |
+
<li><strong>Intuitive user interface</strong>. There's no learning curve: users can scroll or turn pages with a button, preview pages with thumbnails, download and print documents from a web-browser using familiar controls.</li>
|
24 |
+
</ol>
|
25 |
+

|
26 |
+
<h3>Supported File Formats</h3>
|
27 |
+

|
28 |
+
<ul>
|
29 |
+
<li>Portable Document Format: .pdf</li>
|
30 |
+
<li>Microsoft Word: .doc .docx .docm .dot .dotx .dotm</li>
|
31 |
+
<li>Microsoft Excel: .xls .xlsx .xlsm .xlt .xltx .xltm .xlsb .xml</li>
|
32 |
+
<li>Microsoft PowerPoint: .ppt .pptx .pptm</li>
|
33 |
+
<li>Microsoft Visio: .vsd .vss .vst .vsw .vdx .vsx .vtx .vsdx .vsdm .vssx .vssm .vstx .vstm .vsl</li>
|
34 |
+
<li>Microsoft Project: .mpp .mpt .mpx</li>
|
35 |
+
<li>Microsoft Outlook: .msg</li>
|
36 |
+
<li>OpenDocument Formats: .odt .ott .ods .odp</li>
|
37 |
+
<li>Rich Text Format: .rtf</li>
|
38 |
+
<li>Plain Text Format: .txt</li>
|
39 |
+
<li>Comma-Separated Values: .csv</li>
|
40 |
+
<li>HyperText Markup Language: .htm .html .mht .mhtml</li>
|
41 |
+
<li>XML Paper Specification: .xps</li>
|
42 |
+
<li>AutoCAD Drawing File Format: .dwg .dxf</li>
|
43 |
+
<li>Image files: .bmp .gif .jpg .png .tiff</li>
|
44 |
+
</ul>
|
45 |
+

|
46 |
+
<h3>Installing the Extension</h3>
|
47 |
+

|
48 |
+
<strong>Before you proceed:</strong> please be aware that this extension can be used only by registered users of the GroupDocs.Viewer for Java Library. Before you can use the extension, you need to buy a license. We offer a free evaluation version so that you can try it before committing. More information about the library and pricing can be found on <a href="http://groupdocs.com/java/document-viewer-library" target="_blank">GroupDocs' website</a>.
|
49 |
+

|
50 |
+
For detailed installation instructions, read the <a href="put link here" rel="nofollow" target="_blank">Java Viewer extension documentation</a>.
|
51 |
+

|
52 |
+
<h4>Questions?</h4>
|
53 |
+
Please feel free to <a href="http://groupdocs.com/corporate/contact" rel="nofollow" target="_blank">contact us</a>!</description>
|
54 |
+
<notes>initial release</notes>
|
55 |
+
<authors><author><name>GroupDocs</name><user>Marketplace</user><email>support@groupdocs.com</email></author></authors>
|
56 |
+
<date>2014-04-03</date>
|
57 |
+
<time>11:05:55</time>
|
58 |
+
<contents><target name="magelocal"><dir name="Gdvj"><dir name="GroupdocsViewerJava"><dir name="Block"><dir name="Adminhtml"><dir name="Cms"><dir name="Page"><file name="Edit.php" hash="46ada8f533100168a8028e4734fbf446"/></dir></dir><file name="GroupdocsViewerJava.php" hash="290d9f2013ec57f11ffcdc74f7622d0f"/></dir></dir><dir name="Helper"><file name="Data.php" hash="c86abc4805dfda269034a5f9de8df944"/></dir><dir name="Model"><dir name="Mysql4"><dir name="GroupdocsViewerJava"><file name="Collection.php" hash="20838412acb5930767d65042af28e96a"/></dir><file name="groupdocsviewerjava.php" hash="008bf5e43fc0dca261984cef1b9e8437"/></dir><file name="groupdocsviewerjava.php" hash="078884a06dd40a3da865e6cef2228b26"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="ViewerJavaController.php" hash="a07ac617c0c001b1dbc40cb985a23a1f"/></dir></dir><dir name="etc"><file name="config.xml" hash="f20156cafd3b14e0b6a9009913115cda"/></dir><dir name="js"><file name="insert.js" hash="61d1b7be069a5d7207576f062d7c1396"/><file name=".htaccess" hash="7cffe2704dc0e86389a2d02391dcca5d"/></dir><dir name="sql"><dir name="GroupdocsViewerJava_setup"><file name="mysql4-install-0.1.0" hash="10b9ef588f1225c6bdabd5971d0fb539"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gdvj_GroupdocsViewerJava.xml" hash="16b43eacf3206464555dc59f507193aa"/></dir></target></contents>
|
59 |
+
<compatible/>
|
60 |
+
<dependencies><required><php><min>5.3.0</min><max>5.4.0</max></php></required></dependencies>
|
61 |
+
</package>
|