Version Notes
Initial version with basics functionality
Download this release
Release Info
Developer | GroupDocs |
Extension | GroupDocs_Viewer_for_NET |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Gdvd/GroupdocsViewerDotNet/Block/Adminhtml/Cms/Page/Edit.php +62 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/Block/Adminhtml/GroupdocsViewerDotNet.php +7 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/Helper/Data.php +5 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/Model/Mysql4/GroupdocsViewerDotNet/Collection.php +9 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/Model/Mysql4/groupdocsviewerdotnet.php +8 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/Model/groupdocsviewerdotnet.php +9 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/controllers/Adminhtml/ViewerDotNetController.php +33 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/etc/config.xml +119 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/js/.htaccess +2 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/js/insert.js +85 -0
- app/code/local/Gdvd/GroupdocsViewerDotNet/sql/GroupdocsViewerDotNet_setup/mysql4-install-0.1.0 +26 -0
- app/etc/modules/Gdvd_GroupdocsViewerDotNet.xml +9 -0
- package.xml +64 -0
app/code/local/Gdvd/GroupdocsViewerDotNet/Block/Adminhtml/Cms/Page/Edit.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script>
|
2 |
+
// Insert GroupDocs File ID at cms edit page
|
3 |
+
function gdvdfileid() {
|
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", "groupdocsviewerdotnet")
|
22 |
+
form.innerHTML = '<form action="#" name="form">' +
|
23 |
+
'<label for="url">URL to installed GroupDocs Viewer .NET</label><br />' +
|
24 |
+
'<input type="text" name="url" value="" /><input type="checkbox" name="handler" value="true" checked>Use Http Handlers<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="insertViewerDotNet();">' +
|
32 |
+
'<input type="button" name="cancel" value="Cancel" onClick="delFormDotNet()">' +
|
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 Gdvd_GroupdocsViewerDotNet_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/Gdvd/GroupdocsViewerDotNet/js/insert.js');
|
55 |
+
$this->_addButton('button_id', array(
|
56 |
+
'label' => Mage::helper('cms')->__('Add GroupDocs Viewer .NET'),
|
57 |
+
'onclick' => 'gdvdfileid()',
|
58 |
+
'class' => 'go'
|
59 |
+
), 0, 100, 'footer', 'header');
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/local/Gdvd/GroupdocsViewerDotNet/Block/Adminhtml/GroupdocsViewerDotNet.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdvd_GroupdocsViewerDotNet_Block_Adminhtml_GroupdocsViewerJava extends Mage_Adminhtml_Block_Template {
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
}
|
app/code/local/Gdvd/GroupdocsViewerDotNet/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdvd_GroupdocsViewerDotNet_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
+
|
5 |
+
}
|
app/code/local/Gdvd/GroupdocsViewerDotNet/Model/Mysql4/GroupdocsViewerDotNet/Collection.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdvd_GroupdocsViewerDotNet_Model_Mysql4_GroupdocsViewerJava_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('groupdocsviewerdotnet/groupdocsviewerdotnet');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Gdvd/GroupdocsViewerDotNet/Model/Mysql4/groupdocsviewerdotnet.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gdvd_GroupdocsViewerDotNet_Model_Mysql4_GroupdocsViewerJava extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('groupdocsviewerdotnet/groupdocsviewerdotnet', 'id');
|
7 |
+
}
|
8 |
+
}
|
app/code/local/Gdvd/GroupdocsViewerDotNet/Model/groupdocsviewerdotnet.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gdvd_GroupdocsViewerDotNet_Model_GroupdocsViewerDotNet extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('groupdocsviewerdotnet/groupdocsviewerdotnet');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Gdvd/GroupdocsViewerDotNet/controllers/Adminhtml/ViewerDotNetController.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdvd_GroupdocsViewerDotNet_Adminhtml_ViewerDotNetController 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('viewerdotnet');
|
13 |
+
$this->renderLayout();
|
14 |
+
}
|
15 |
+
|
16 |
+
public function postAction()
|
17 |
+
{
|
18 |
+
$post = $this->getRequest()->getPost();
|
19 |
+
try {
|
20 |
+
if (empty($post)) {
|
21 |
+
Mage::throwException($this->__('Invalid form data.'));
|
22 |
+
}
|
23 |
+
|
24 |
+
/* here's your form processing */
|
25 |
+
|
26 |
+
$message = $this->__('Your form has been submitted successfully.');
|
27 |
+
Mage::getSingleton('adminhtml/session')->addSuccess($message);
|
28 |
+
} catch (Exception $e) {
|
29 |
+
Mage::getSingleton('adminhtml/session')->addError($e->getMessage());
|
30 |
+
}
|
31 |
+
$this->_redirect('*/*');
|
32 |
+
}
|
33 |
+
}
|
app/code/local/Gdvd/GroupdocsViewerDotNet/etc/config.xml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gdvd_GroupdocsViewerDotNet>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Gdvd_GroupdocsViewerDotNet>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
|
11 |
+
<blocks>
|
12 |
+
<adminhtml>
|
13 |
+
<rewrite>
|
14 |
+
<cms_page_edit>Gdvd_GroupdocsViewerDotNet_Block_Adminhtml_Cms_Page_Edit</cms_page_edit>
|
15 |
+
</rewrite>
|
16 |
+
</adminhtml>
|
17 |
+
</blocks>
|
18 |
+
|
19 |
+
|
20 |
+
<models>
|
21 |
+
<groupdocsviewerdotnet>
|
22 |
+
<class>Gdvd_GroupdocsViewerDotNet_Model</class>
|
23 |
+
<resourceModel>groupdocsviewerdotnet_mysql4</resourceModel>
|
24 |
+
</groupdocsviewerdotnet>
|
25 |
+
<groupdocsviewerdotnet_mysql4>
|
26 |
+
<class>Gdvd_GroupdocsViewerDotNet_Model_Mysql4</class>
|
27 |
+
<entities>
|
28 |
+
<groupdocsviewerdotnet>
|
29 |
+
<table>groupdocsvd</table>
|
30 |
+
</groupdocsviewerdotnet>
|
31 |
+
</entities>
|
32 |
+
</groupdocsviewerdotnet_mysql4>
|
33 |
+
</models>
|
34 |
+
<resources>
|
35 |
+
<groupdocsviewerdotnet_write>
|
36 |
+
<connection>
|
37 |
+
<use>core_write</use>
|
38 |
+
</connection>
|
39 |
+
</groupdocsviewerdotnet_write>
|
40 |
+
|
41 |
+
<groupdocsviewerdotnet_read>
|
42 |
+
<connection>
|
43 |
+
<use>core_read</use>
|
44 |
+
</connection>
|
45 |
+
</groupdocsviewerdotnet_read>
|
46 |
+
|
47 |
+
<groupdocsviewerdotnet_delete>
|
48 |
+
<connection>
|
49 |
+
<use>core_delete</use>
|
50 |
+
</connection>
|
51 |
+
</groupdocsviewerdotnet_delete>
|
52 |
+
</resources>
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
<blocks>
|
59 |
+
<groupdocsviewerdotnet>
|
60 |
+
<class>Gdvd_GroupdocsViewerDotNet_Block</class>
|
61 |
+
</groupdocsviewerdotnet>
|
62 |
+
</blocks>
|
63 |
+
<helpers>
|
64 |
+
<groupdocsviewerdotnet>
|
65 |
+
<class>Gdvd_GroupdocsViewerDotNet_Helper</class>
|
66 |
+
</groupdocsviewerdotnet>
|
67 |
+
</helpers>
|
68 |
+
</global>
|
69 |
+
|
70 |
+
<admin>
|
71 |
+
<routers>
|
72 |
+
<groupdocsviewerdotnet>
|
73 |
+
<use>admin</use>
|
74 |
+
<args>
|
75 |
+
<module>Gdvd_GroupdocsViewerDotNet</module>
|
76 |
+
<frontName>groupdocsviewerdotnet</frontName>
|
77 |
+
</args>
|
78 |
+
</groupdocsviewerdotnet>
|
79 |
+
</routers>
|
80 |
+
</admin>
|
81 |
+
|
82 |
+
<adminhtml>
|
83 |
+
|
84 |
+
<menu>
|
85 |
+
<catalog>
|
86 |
+
<children>
|
87 |
+
<groupdocsviewerdotnet_adminform translate="title" module="groupdocsviewerdotnet">
|
88 |
+
<title>Groupdocs Viewer .NET</title>
|
89 |
+
<action>groupdocsviewerdotnet/adminhtml_viewerdotnet</action>
|
90 |
+
</groupdocsviewerdotnet_adminform>
|
91 |
+
</children>
|
92 |
+
</catalog>
|
93 |
+
</menu>
|
94 |
+
|
95 |
+
<acl>
|
96 |
+
<resources>
|
97 |
+
<admin>
|
98 |
+
<children>
|
99 |
+
<catalog>
|
100 |
+
<children>
|
101 |
+
<groupdocsviewerdotnet_adminform>
|
102 |
+
<title>Groupdocs Viewer .NET</title>
|
103 |
+
</groupdocsviewerdotnet_adminform>
|
104 |
+
</children>
|
105 |
+
</catalog>
|
106 |
+
</children>
|
107 |
+
</admin>
|
108 |
+
</resources>
|
109 |
+
</acl>
|
110 |
+
|
111 |
+
<layout>
|
112 |
+
<updates>
|
113 |
+
<groupdocsviewerdotnet>
|
114 |
+
<file>groupdocsviewerdotnet.xml</file>
|
115 |
+
</groupdocsviewerdotnet>
|
116 |
+
</updates>
|
117 |
+
</layout>
|
118 |
+
</adminhtml>
|
119 |
+
</config>
|
app/code/local/Gdvd/GroupdocsViewerDotNet/js/.htaccess
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
order deny,allow
|
2 |
+
Allow from all
|
app/code/local/Gdvd/GroupdocsViewerDotNet/js/insert.js
ADDED
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function insertViewerDotNet()
|
2 |
+
{
|
3 |
+
var form = document.forms.form;
|
4 |
+
var url = form.url.value;
|
5 |
+
var path = form.path.value;
|
6 |
+
var handler = form.handler;
|
7 |
+
var width = form.width.value;
|
8 |
+
var height = form.height.value;
|
9 |
+
var content = '';
|
10 |
+
var use = '';
|
11 |
+
if (url != "") {
|
12 |
+
if (width == "") {
|
13 |
+
width = "650";
|
14 |
+
}
|
15 |
+
if (height == "") {
|
16 |
+
height = "750";
|
17 |
+
}
|
18 |
+
if (handler.checked) {
|
19 |
+
handler = "Handler";
|
20 |
+
use = true;
|
21 |
+
content = 'with handler';
|
22 |
+
} else {
|
23 |
+
use = false;
|
24 |
+
handler = "";
|
25 |
+
content = 'with out handler'
|
26 |
+
}
|
27 |
+
var libs = "<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/jquery-1.9.1.min.js'></script>" +
|
28 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/jquery-ui-1.10.3.min.js'></script>" +
|
29 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/knockout-2.2.1.js'></script>" +
|
30 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/turn.min.js'></script>" +
|
31 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/modernizr.2.6.2.Transform2d.min.js'></script>" +
|
32 |
+
"<script type='text/javascript' language='JavaScript'>" +
|
33 |
+
"if (!window.Modernizr.csstransforms) {" +
|
34 |
+
"$.ajax({url: '" + url + "document-viewer/GetScript" + handler + "?name=libs/turn.html4.min.js'," +
|
35 |
+
"dataType: 'script', type: 'GET', async: false});"+
|
36 |
+
"}" +
|
37 |
+
"</script>" +
|
38 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=installableViewer.min.js'><\/script>" +
|
39 |
+
"<script type='text/javascript'>$.fn.groupdocsViewer.prototype.applicationPath = '" + url + "';</script>" +
|
40 |
+
"<script type='text/javascript'>$.fn.groupdocsViewer.prototype.useHttpHandlers = " + use + ";</script>" +
|
41 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=GroupdocsViewer.all.min.js'></script>" +
|
42 |
+
"<script type='text/javascript' language='JavaScript'>" +
|
43 |
+
"$(function() {" +
|
44 |
+
"var styleBootstrap = document.createElement('link');" +
|
45 |
+
"styleBootstrap.setAttribute('rel', 'stylesheet');" +
|
46 |
+
"styleBootstrap.setAttribute('type', 'text/css');" +
|
47 |
+
"styleBootstrap.setAttribute('href', '" + url + "document-viewer/CSS/GetCss" + handler + "?name=bootstrap.css');" +
|
48 |
+
"var gdCss = document.createElement('link');" +
|
49 |
+
"gdCss.setAttribute('rel', 'stylesheet');" +
|
50 |
+
"gdCss.setAttribute('type', 'text/css');" +
|
51 |
+
"gdCss.setAttribute('href', '" + url + "document-viewer/CSS/GetCss" + handler + "?name=GroupdocsViewer.all.min.css');" +
|
52 |
+
"var uiCss = document.createElement('link');" +
|
53 |
+
"uiCss.setAttribute('rel', 'stylesheet');" +
|
54 |
+
"uiCss.setAttribute('type', 'text/css');" +
|
55 |
+
"uiCss.setAttribute('href', '" + url + "document-viewer/CSS/GetCss" + handler + "?name=jquery-ui-1.10.3.dialog.min.css');" +
|
56 |
+
"document.getElementsByTagName('head')[0].appendChild(styleBootstrap);" +
|
57 |
+
"document.getElementsByTagName('head')[0].appendChild(gdCss);" +
|
58 |
+
"document.getElementsByTagName('head')[0].appendChild(uiCss);" +
|
59 |
+
"var localizedStrings = null;" +
|
60 |
+
"var thumbsImageBase64Encoded = null;" +
|
61 |
+
"$('#viewerdotnet').groupdocsViewer({ filePath: '" + path + "', docViewerId: 'doc_viewer1', quality: 100, showHeader: true, showThumbnails: false, openThumbnails: false, initialZoom: 100," +
|
62 |
+
"zoomToFitWidth: true, zoomToFitHeight: false, backgroundColor: '', showFolderBrowser: true, showPrint: true, showDownload: true, showZoom: true, showPaging: true," +
|
63 |
+
"showViewerStyleControl: true, showSearch: true, preloadPagesCount: 0, viewerStyle: 1, supportTextSelection: true, localizedStrings: localizedStrings," +
|
64 |
+
"thumbsImageBase64Encoded: thumbsImageBase64Encoded, showDownloadErrorsInPopup: true });" +
|
65 |
+
"});" +
|
66 |
+
"</script>";
|
67 |
+
var div = '<div id="viewerdotnet" 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;">' + content + '</span></div>';
|
68 |
+
var tinyMceContent = tinyMCE.activeEditor.getContent();
|
69 |
+
// set content
|
70 |
+
tinyMCE.activeEditor.setContent(tinyMceContent + libs + div);
|
71 |
+
} else {
|
72 |
+
var tinyMceContent = tinyMCE.activeEditor.getContent();
|
73 |
+
// set content
|
74 |
+
|
75 |
+
tinyMCE.activeEditor.setContent(tinyMceContent + "Please fill \"URL of installed GroupDocs Viewer .NET\" field in form");
|
76 |
+
}
|
77 |
+
|
78 |
+
}
|
79 |
+
|
80 |
+
function delFormDotNet() {
|
81 |
+
var del = document.getElementById('page_tabs_content_section_content');
|
82 |
+
var divToDel = document.getElementById("groupdocsviewerdotnet");
|
83 |
+
del.removeChild(divToDel);
|
84 |
+
}
|
85 |
+
|
app/code/local/Gdvd/GroupdocsViewerDotNet/sql/GroupdocsViewerDotNet_setup/mysql4-install-0.1.0
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 `groupdocsvd` (
|
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 |
+
`handler` varchar(255) DEFAULT NULL,
|
21 |
+
PRIMARY KEY (`id`)
|
22 |
+
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
23 |
+
|
24 |
+
");
|
25 |
+
|
26 |
+
$installer->endSetup();
|
app/etc/modules/Gdvd_GroupdocsViewerDotNet.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gdvd_GroupdocsViewerDotNet>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Gdvd_GroupdocsViewerDotNet>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>GroupDocs_Viewer_for_NET</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://www.gnu.org/licenses/gpl.html">GPL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>.NET version of the GroupDocs' online document viewer.</summary>
|
10 |
+
<description><h2>.NET & ASP.NET Document Viewer Control</h2>
|
11 |
+

|
12 |
+
This extension is created based on <a href="http://groupdocs.com/dot-net/document-viewer-library" target="_blank">GroupDocs' .NET & ASP.NET document viewer control</a>, which is an online document viewer that can be hosted on-site and allows you to display over 45 different kinds of files directly on your Magento website. The viewer is completely independent, meaning users don't have to install any additional software to view documents online.
|
13 |
+

|
14 |
+
<h3>Key Features & Benefits</h3>
|
15 |
+

|
16 |
+
<p>1. GroupDocs Viewer can both rasterize documents and convert them to HTML+CSS+SVG using HTML5 technology. The last option enables you to display documents with native text rendering. This allows users to select and copy text to clipboard right from the embedded documents on your website.</p>
|
17 |
+

|
18 |
+
<p>2. When converted to HTML+CSS+SVG, documents are scalable and can be fit to any page or screen size without losing rendering quality - text looks clear and sharp.</p>
|
19 |
+

|
20 |
+
<p>3. GroupDocs' document viewer control for .NET & ASP.NET comes with a convenient UI for easy document navigation. Users can scroll documents, turn pages with buttons or jump straight to a specified page. There is also a thumbnail bar for a quick page preview and a search option which allows users to search for text within a document using keywords.</p>
|
21 |
+

|
22 |
+
<p>4. Embedded documents can be downloaded and printed out right from a web-browser. However, if you don't want users to copy a document, you can disable the download/print/copy options easily.</p>
|
23 |
+

|
24 |
+
<p>5. GroupDocs Viewer doesn't require Flash, Acrobat Reader or any other software installation on the client side. Users can view documents from any device with a web-browser that supports HTML5.</p>
|
25 |
+

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

|
28 |
+
With the GroupDocs' document viewer control you can display documents of almost all common business formats:
|
29 |
+

|
30 |
+
Portable Document Format: PDF
|
31 |
+
Microsoft Word: DOC, DOCX, DOCM, DOT, DOTX, DOTM
|
32 |
+
Microsoft Excel: XLS, XLSX, XLSM, XLSB, XML
|
33 |
+
Microsoft PowerPoint: PPT, PPTX
|
34 |
+
Microsoft Visio: VSD, VDX, VSS, VSX, VST, VTX, VSDX, VDW
|
35 |
+
Microsoft Project: MPP, MPT
|
36 |
+
Microsoft Outlook: MSG, EML
|
37 |
+
OpenDocument Formats: ODT, OTT, ODS, ODP
|
38 |
+
Rich Text Format: RTF
|
39 |
+
Plain Text File: TXT
|
40 |
+
Comma-Separated Values: CSV
|
41 |
+
HyperText Markup Language: HTM, HTML, MHT, MHTML
|
42 |
+
XML Paper Specification: XPS
|
43 |
+
AutoCAD Drawing File Format: DXF
|
44 |
+
Image files: BMP, GIF, JPG, PNG, TIFF
|
45 |
+
Electronic publication: EPUB
|
46 |
+
<h3>Installation</h3>
|
47 |
+

|
48 |
+
<strong>Please note:</strong> to use the .NET (ASP.NET) version of GroupDocs' document viewer on your Magento website, you need to <a href="http://groupdocs.com/purchase/dotnet-pricing" rel="nofollow" target="_blank">buy a license</a> first. Alternatively, please <a href="http://groupdocs.com/corporate/contact" rel="nofollow" target="_blank">contact our sales</a> for a free 30-day evaluation license, so that you can test everything before buying our service.
|
49 |
+

|
50 |
+
Find installation and usage instructions <a href="put link here" rel="nofollow" target="_blank">here</a>.
|
51 |
+

|
52 |
+
<h3>Have Questions?</h3>
|
53 |
+

|
54 |
+
Learn more about the features and benefits of GroupDocs' document viewer control on our official <a href="http://groupdocs.com/dot-net/document-viewer-library" target="_blank">website</a>.
|
55 |
+

|
56 |
+
Also, please feel free to <a href="http://groupdocs.com/corporate/contact" rel="nofollow" target="_blank">contact us</a> for any additional information and help.</description>
|
57 |
+
<notes>Initial version with basics functionality</notes>
|
58 |
+
<authors><author><name>GroupDocs</name><user>Marketplace</user><email>support@groupdocs.com</email></author></authors>
|
59 |
+
<date>2014-01-13</date>
|
60 |
+
<time>12:12:15</time>
|
61 |
+
<contents><target name="magelocal"><dir name="Gdvd"><dir name="GroupdocsViewerDotNet"><dir name="Block"><dir name="Adminhtml"><dir name="Cms"><dir name="Page"><file name="Edit.php" hash="a57bc44d023b850cc31cb40176b77b66"/></dir></dir><file name="GroupdocsViewerDotNet.php" hash="ef4d293f69c51f55a6e2b9cdd206cf33"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ViewerDotNetController.php" hash="d04ffdb9d1790651fcb09b7fdf53c0e1"/></dir></dir><dir name="etc"><file name="config.xml" hash="95d96e7ef68c3c092856d878af541a41"/></dir><dir name="Helper"><file name="Data.php" hash="e66bbc1ee2010d1206b480585cf5488f"/></dir><dir name="js"><file name=".htaccess" hash="7cffe2704dc0e86389a2d02391dcca5d"/><file name="insert.js" hash="05b60a5d687c1037f8364337ea6a53ce"/></dir><dir name="Model"><dir name="Mysql4"><dir name="GroupdocsViewerDotNet"><file name="Collection.php" hash="7c5739d2fdc9d82c27fa4b306665c28a"/></dir><file name="groupdocsviewerdotnet.php" hash="c71d20895f48447e08872e115bcf4dc0"/><file name="groupdocsviewerdotnet.php" hash="c71d20895f48447e08872e115bcf4dc0"/></dir><file name="groupdocsviewerdotnet.php" hash="502a4726216f74dd52ddc483ea825612"/></dir><dir name="sql"><dir name="GroupdocsViewerDotNet_setup"><file name="mysql4-install-0.1.0" hash="a5792b9599cb77f55706966813fb31ad"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gdvd_GroupdocsViewerDotNet.xml" hash="9795d3d4b921acbd6413fff001d83efc"/></dir></target></contents>
|
62 |
+
<compatible/>
|
63 |
+
<dependencies><required><php><min>5.3.0</min><max>5.4.0</max></php></required></dependencies>
|
64 |
+
</package>
|