Version Notes
Initial release
Download this release
Release Info
Developer | GroupDocs |
Extension | magento-groupdocs-annotation-dotnet |
Version | 1.0.0 |
Comparing to | |
See all releases |
Version 1.0.0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/Block/Adminhtml/Cms/Page/Edit.php +62 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/Block/Adminhtml/GroupdocsAnnotationDotNet.php +7 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/Helper/Data.php +5 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/Model/Mysql4/GroupdocsAnnotationDotNet/Collection.php +9 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/Model/Mysql4/groupdocsannotationdotnet.php +8 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/Model/groupdocsannotationdotnet.php +9 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/controllers/Adminhtml/AnnotationDotNetController.php +33 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/etc/config.xml +119 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/js/.htaccess +2 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/js/insert.js +129 -0
- app/code/local/Gdad/GroupdocsAnnotationDotNet/sql/GroupdocsAnnotationDotNet_setup/mysql4-install-0.1.0 +26 -0
- app/etc/modules/Gdad_GroupdocsAnnotationDotNet.xml +9 -0
- package.xml +35 -0
app/code/local/Gdad/GroupdocsAnnotationDotNet/Block/Adminhtml/Cms/Page/Edit.php
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<script>
|
2 |
+
// Insert GroupDocs File ID at cms edit page
|
3 |
+
function gdafileid() {
|
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", "groupdocsannotationdotnet")
|
22 |
+
form.innerHTML = '<form action="#" name="formAnnotation">' +
|
23 |
+
'<label for="url">URL to installed GroupDocs Annotation .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">Document for Annotation</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="insertAnnotationDotNet();">' +
|
32 |
+
'<input type="button" name="cancel" value="Cancel" onClick="delAnnotationFormDotNet()">' +
|
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 Gdad_GroupdocsAnnotationDotNet_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/Gdad/GroupdocsAnnotationDotNet/js/insert.js');
|
55 |
+
$this->_addButton('button_id', array(
|
56 |
+
'label' => Mage::helper('cms')->__('Add GroupDocs Annotation .NET'),
|
57 |
+
'onclick' => 'gdafileid()',
|
58 |
+
'class' => 'go'
|
59 |
+
), 0, 100, 'footer', 'header');
|
60 |
+
}
|
61 |
+
|
62 |
+
}
|
app/code/local/Gdad/GroupdocsAnnotationDotNet/Block/Adminhtml/GroupdocsAnnotationDotNet.php
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdad_GroupdocsAnnotationDotNet_Block_Adminhtml_GroupdocsAnnotationDotNet extends Mage_Adminhtml_Block_Template {
|
4 |
+
|
5 |
+
|
6 |
+
|
7 |
+
}
|
app/code/local/Gdad/GroupdocsAnnotationDotNet/Helper/Data.php
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdad_GroupdocsAnnotationDotNet_Helper_Data extends Mage_Core_Helper_Abstract {
|
4 |
+
|
5 |
+
}
|
app/code/local/Gdad/GroupdocsAnnotationDotNet/Model/Mysql4/GroupdocsAnnotationDotNet/Collection.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdad_GroupdocsAnnotationDotNet_Model_Mysql4_GroupdocsAnnotationJava_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
4 |
+
{
|
5 |
+
public function _construct()
|
6 |
+
{
|
7 |
+
$this->_init('groupdocsannotationdotnet/groupdocsannotationdotnet');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Gdad/GroupdocsAnnotationDotNet/Model/Mysql4/groupdocsannotationdotnet.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gdad_GroupdocsAnnotationDotNet_Model_Mysql4_GroupdocsAnnotationJava extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('groupdocsannotationdotnet/groupdocsannotationdotnet', 'id');
|
7 |
+
}
|
8 |
+
}
|
app/code/local/Gdad/GroupdocsAnnotationDotNet/Model/groupdocsannotationdotnet.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class Gdad_GroupdocsAnnotationDotNet_Model_GroupdocsAnnotationDotNet extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('groupdocsannotationdotnet/groupdocsannotationdotnet');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/Gdad/GroupdocsAnnotationDotNet/controllers/Adminhtml/AnnotationDotNetController.php
ADDED
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Gdad_GroupdocsAnnotationDotNet_Adminhtml_AnnotationDotNetController 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('annotationdotnet');
|
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/Gdad/GroupdocsAnnotationDotNet/etc/config.xml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gdad_GroupdocsAnnotationDotNet>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Gdad_GroupdocsAnnotationDotNet>
|
7 |
+
</modules>
|
8 |
+
|
9 |
+
<global>
|
10 |
+
|
11 |
+
<blocks>
|
12 |
+
<adminhtml>
|
13 |
+
<rewrite>
|
14 |
+
<cms_page_edit>Gdad_GroupdocsAnnotationDotNet_Block_Adminhtml_Cms_Page_Edit</cms_page_edit>
|
15 |
+
</rewrite>
|
16 |
+
</adminhtml>
|
17 |
+
</blocks>
|
18 |
+
|
19 |
+
|
20 |
+
<models>
|
21 |
+
<groupdocsannotationdotnet>
|
22 |
+
<class>Gdad_GroupdocsAnnotationDotNet_Model</class>
|
23 |
+
<resourceModel>groupdocsannotationdotnet_mysql4</resourceModel>
|
24 |
+
</groupdocsannotationdotnet>
|
25 |
+
<groupdocsannotationdotnet_mysql4>
|
26 |
+
<class>Gdad_GroupdocsAnnotationDotNet_Model_Mysql4</class>
|
27 |
+
<entities>
|
28 |
+
<groupdocsannotationdotnet>
|
29 |
+
<table>groupdocsad</table>
|
30 |
+
</groupdocsannotationdotnet>
|
31 |
+
</entities>
|
32 |
+
</groupdocsannotationdotnet_mysql4>
|
33 |
+
</models>
|
34 |
+
<resources>
|
35 |
+
<groupdocsannotationdotnet_write>
|
36 |
+
<connection>
|
37 |
+
<use>core_write</use>
|
38 |
+
</connection>
|
39 |
+
</groupdocsannotationdotnet_write>
|
40 |
+
|
41 |
+
<groupdocsannotationdotnet_read>
|
42 |
+
<connection>
|
43 |
+
<use>core_read</use>
|
44 |
+
</connection>
|
45 |
+
</groupdocsannotationdotnet_read>
|
46 |
+
|
47 |
+
<groupdocsannotationdotnet_delete>
|
48 |
+
<connection>
|
49 |
+
<use>core_delete</use>
|
50 |
+
</connection>
|
51 |
+
</groupdocsannotationdotnet_delete>
|
52 |
+
</resources>
|
53 |
+
|
54 |
+
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
<blocks>
|
59 |
+
<groupdocsannotationdotnet>
|
60 |
+
<class>Gdad_GroupdocsAnnotationDotNet_Block</class>
|
61 |
+
</groupdocsannotationdotnet>
|
62 |
+
</blocks>
|
63 |
+
<helpers>
|
64 |
+
<groupdocsannotationdotnet>
|
65 |
+
<class>Gdad_GroupdocsAnnotationDotNet_Helper</class>
|
66 |
+
</groupdocsannotationdotnet>
|
67 |
+
</helpers>
|
68 |
+
</global>
|
69 |
+
|
70 |
+
<admin>
|
71 |
+
<routers>
|
72 |
+
<groupdocsannotationdotnet>
|
73 |
+
<use>admin</use>
|
74 |
+
<args>
|
75 |
+
<module>Gdad_GroupdocsAnnotationDotNet</module>
|
76 |
+
<frontName>groupdocsannotationdotnet</frontName>
|
77 |
+
</args>
|
78 |
+
</groupdocsannotationdotnet>
|
79 |
+
</routers>
|
80 |
+
</admin>
|
81 |
+
|
82 |
+
<adminhtml>
|
83 |
+
|
84 |
+
<menu>
|
85 |
+
<catalog>
|
86 |
+
<children>
|
87 |
+
<groupdocsannotationdotnet_adminform translate="title" module="groupdocsannotationdotnet">
|
88 |
+
<title>Groupdocs Annotation .NET</title>
|
89 |
+
<action>groupdocsannotationdotnet/adminhtml_annotationdotnet</action>
|
90 |
+
</groupdocsannotationdotnet_adminform>
|
91 |
+
</children>
|
92 |
+
</catalog>
|
93 |
+
</menu>
|
94 |
+
|
95 |
+
<acl>
|
96 |
+
<resources>
|
97 |
+
<admin>
|
98 |
+
<children>
|
99 |
+
<catalog>
|
100 |
+
<children>
|
101 |
+
<groupdocsannotationdotnet_adminform>
|
102 |
+
<title>Groupdocs Annotation .NET</title>
|
103 |
+
</groupdocsannotationdotnet_adminform>
|
104 |
+
</children>
|
105 |
+
</catalog>
|
106 |
+
</children>
|
107 |
+
</admin>
|
108 |
+
</resources>
|
109 |
+
</acl>
|
110 |
+
|
111 |
+
<layout>
|
112 |
+
<updates>
|
113 |
+
<groupdocsannotationdotnet>
|
114 |
+
<file>groupdocsannotationdotnet.xml</file>
|
115 |
+
</groupdocsannotationdotnet>
|
116 |
+
</updates>
|
117 |
+
</layout>
|
118 |
+
</adminhtml>
|
119 |
+
</config>
|
app/code/local/Gdad/GroupdocsAnnotationDotNet/js/.htaccess
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
1 |
+
order deny,allow
|
2 |
+
Allow from all
|
app/code/local/Gdad/GroupdocsAnnotationDotNet/js/insert.js
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function insertAnnotationDotNet()
|
2 |
+
{
|
3 |
+
|
4 |
+
var form = document.forms.formAnnotation;
|
5 |
+
var url = form.url.value;
|
6 |
+
var docName = form.path.value;
|
7 |
+
var handler = form.handler;
|
8 |
+
var width = form.width.value;
|
9 |
+
var height = form.height.value;
|
10 |
+
var content = '';
|
11 |
+
var use = '';
|
12 |
+
if (url != "") {
|
13 |
+
if (width == "") {
|
14 |
+
width = "650";
|
15 |
+
}
|
16 |
+
if (height == "") {
|
17 |
+
height = "750";
|
18 |
+
}
|
19 |
+
if (handler.checked) {
|
20 |
+
handler = "Handler";
|
21 |
+
use = true;
|
22 |
+
content = 'with handler';
|
23 |
+
} else {
|
24 |
+
use = false;
|
25 |
+
handler = "";
|
26 |
+
content = 'with out handler'
|
27 |
+
}
|
28 |
+
if (url.slice(-1) != '/') {
|
29 |
+
url = url + '/';
|
30 |
+
}
|
31 |
+
var libs = "<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/jquery-1.9.1.min.js'></script>" +
|
32 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/jquery-ui-1.10.3.min.js'></script>" +
|
33 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/knockout-3.0.0.js'></script>" +
|
34 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/turn.min.js'></script>" +
|
35 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=libs/modernizr.2.6.2.Transform2d.min.js'></script>" +
|
36 |
+
"<script type='text/javascript'>if (!window.Modernizr.csstransforms) $.ajax({url: '" + url + "document-viewer/GetScript" + handler + "?name=libs/turn.html4.min.js', dataType: 'script', type: 'GET', async: false});</script>" +
|
37 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=installableViewer.min.js'></script>" +
|
38 |
+
"<script type='text/javascript'>$.ui.groupdocsViewer.prototype.applicationPath = '" + url + "';</script>" +
|
39 |
+
"<script type='text/javascript'>$.ui.groupdocsViewer.prototype.useHttpHandlers = " + use + ";</script>" +
|
40 |
+
"<script type='text/javascript' src='" + url + "document-viewer/GetScript" + handler + "?name=GroupdocsViewer.all.min.js'></script>" +
|
41 |
+
"<script type='text/javascript' language='JavaScript'>" +
|
42 |
+
"$(function() {" +
|
43 |
+
"var styleBootstrap = document.createElement('link');" +
|
44 |
+
"styleBootstrap.setAttribute('rel', 'stylesheet');" +
|
45 |
+
"styleBootstrap.setAttribute('type', 'text/css');" +
|
46 |
+
"styleBootstrap.setAttribute('href', '" + url + "document-viewer/CSS/GetCss" + handler + "?name=bootstrap.css');" +
|
47 |
+
"var gdCss = document.createElement('link');" +
|
48 |
+
"gdCss.setAttribute('rel', 'stylesheet');" +
|
49 |
+
"gdCss.setAttribute('type', 'text/css');" +
|
50 |
+
"gdCss.setAttribute('href', '" + url + "document-viewer/CSS/GetCss" + handler + "?name=GroupdocsViewer.all.min.css');" +
|
51 |
+
"var uiCss = document.createElement('link');" +
|
52 |
+
"uiCss.setAttribute('rel', 'stylesheet');" +
|
53 |
+
"uiCss.setAttribute('type', 'text/css');" +
|
54 |
+
"uiCss.setAttribute('href', '" + url + "document-viewer/CSS/GetCss" + handler + "?name=jquery-ui-1.10.3.dialog.min.css');" +
|
55 |
+
"document.getElementsByTagName('head')[0].appendChild(styleBootstrap);" +
|
56 |
+
"document.getElementsByTagName('head')[0].appendChild(gdCss);" +
|
57 |
+
"document.getElementsByTagName('head')[0].appendChild(uiCss);" +
|
58 |
+
"});" +
|
59 |
+
"</script>" +
|
60 |
+
"<script type='text/javascript' src='" + url + "document-annotation/GetScript" + handler + "?name=libs/jquery.signalR-1.1.2.min.js'></script>" +
|
61 |
+
"<script type='text/javascript' src='" + url + "document-annotation/GetScript" + handler + "?name=libs/jquery.tinyscrollbar.min.js'></script>" +
|
62 |
+
"<script type='text/javascript' src='" + url + "document-annotation/GetScript" + handler + "?name=GroupdocsAnnotation.all.min.js'></script>" +
|
63 |
+
"<script type='text/javascript' language='JavaScript'>" +
|
64 |
+
"var styleAnnotation = document.createElement('link');" +
|
65 |
+
"styleAnnotation.setAttribute('rel', 'stylesheet');" +
|
66 |
+
"styleAnnotation.setAttribute('type', 'text/css');" +
|
67 |
+
"styleAnnotation.setAttribute('href', '" + url + "document-annotation/CSS/GetCss" + handler + "?name=Annotation.css');" +
|
68 |
+
"var styleToolbox = document.createElement('link');" +
|
69 |
+
"styleToolbox.setAttribute('rel', 'stylesheet');" +
|
70 |
+
"styleToolbox.setAttribute('type', 'text/css');" +
|
71 |
+
"styleToolbox.setAttribute('href', '" + url + "document-annotation/CSS/GetCss" + handler + "?name=Toolbox.css');" +
|
72 |
+
"document.getElementsByTagName('head')[0].appendChild(styleAnnotation);" +
|
73 |
+
"document.getElementsByTagName('head')[0].appendChild(styleToolbox);" +
|
74 |
+
"</script>" +
|
75 |
+
"<script type='text/javascript' src='" + url + "signalr1_1_2/hubs'></script>"+
|
76 |
+
"<script type='text/javascript' language='JavaScript'>" +
|
77 |
+
"$(function () {var annotationWidget=$('#annotation-widget').groupdocsAnnotation({width:"+ width +",height:" + height + ",fileId:'" + docName + "',docViewerId:'annotation-widget-doc-viewer',quality:90,enableRightClickMenu:!1,showHeader:!0,showZoom:!0,showPaging:!0,showPrint:!1,showFileExplorer:!0,showThumbnails:!0,openThumbnails:!1,zoomToFitWidth:!1,zoomToFitHeight:!1,initialZoom:100,preloadPagesCount:0,sideboarContainerSelector:'div.comments_sidebar_wrapper',usePageNumberInUrlHash:!1,textSelectionSynchronousCalculation:!0,variableHeightPageSupport:!0," +
|
78 |
+
"useJavaScriptDocumentDescription:!0,isRightPanelEnabled:!0,createMarkup:!0,use_pdf:'true',_mode:'annotatedDocument',selectionContainerSelector:'[name=\"selection-content\"]',graphicsContainerSelector:'.annotationsContainer',userName:'Anonymous',userId:'91bc6680a1a6a0f6',enabledTools:-1,enableSidePanel:!0}),annotationsViewer=$(annotationWidget).groupdocsAnnotation('getViewer'),annotationsViewerVM=$(annotationsViewer).groupdocsAnnotationViewer('getViewModel'),commentModePanel=$(annotationWidget).find('div.embed_annotation_tools');" +
|
79 |
+
"commentModePanel.css('margin-right',0);commentModePanel.draggable({scroll:!1,handle:'.tools_dots',containment:'body',appendTo:'body'});$(annotationWidget).find('.tool_field').click(function(){var a=$(annotationWidget).find('.tool_field');a.hasClass('active')&&$(a.removeClass('active'));$(this).addClass('active')});$(annotationWidget).find('.header_tools_icon').hover(function(){$(this).find('.tooltip_on_hover').css('display','block')},function(){$(this).find('.tooltip_on_hover').css('display','none')});" +
|
80 |
+
"$('#annotation-widget .comments_togle_btn').click(function(){flipPanels(!0)});$(annotationWidget).find('.comments_scroll').tinyscrollbar({sizethumb:50});$(annotationWidget).find('.comments_scroll_2').tinyscrollbar({sizethumb:50});var annotationIconsWrapper=$(annotationWidget).find('.annotation_icons_wrapper'),annotationIconsWrapperParent=annotationIconsWrapper.parent()[0],annotationIconsWrapperParentScrollTop;" +
|
81 |
+
"annotationsViewer.bind('onDocumentLoadComplete',function(a,b){annotationsViewerVM.listAnnotations();annotationsViewerVM.setHandToolMode();annotationIconsWrapper.height($(annotationsViewer).find('.pages_container').height());annotationIconsWrapperParent.scrollTop=annotationIconsWrapperParentScrollTop});annotationsViewer.bind('onDocViewScrollPositionSet',function(a,b){annotationIconsWrapper.parent()[0].scrollTop=b.position}.bind(this));" +
|
82 |
+
"annotationsViewer.bind('onBeforeScrollDocView onDocViewScrollPositionSet',function(a,b){annotationIconsWrapperParent.scrollTop!=b.position&&(annotationIconsWrapperParentScrollTop=annotationIconsWrapperParent.scrollTop=b.position)}.bind(this));" +
|
83 |
+
"function flipPanels(a){function b(){d||(annotationIconsWrapperParent.scrollTop=e.scrollTop)}function c(){b();if(a)annotationsViewerVM.redrawConnectingLines(!d);else{annotationsViewerVM.resizePagesToWindowSize();var c=annotationsViewerVM.getSelectable();null!=c&&(c.data('ui-dvselectable')||c.data('dvselectable')).initStorage();annotationsViewerVM.redrawWorkingArea()}}var e=$(annotationsViewer)[0],d=$(annotationWidget).find('.comments_sidebar_collapsed').is(':visible');if(a){d||c();var f=window.setInterval(function(){b()}," +
|
84 |
+
"50);$(annotationWidget).find('.comments_sidebar_collapsed').toggle('slide',{direction:'right'},400,function(){clearInterval(f);b()});$(annotationWidget).find('.comments_sidebar_expanded').toggle('slide',{direction:'right'},400,function(){d?c():b()})}else c(),$(annotationWidget).find('.comments_scroll').tinyscrollbar_update('relative'),$(annotationWidget).find('.comments_scroll_2').tinyscrollbar_update('relative')}$(window).resize(function(){flipPanels(!1);resizeSidebar()});resizeSidebar();" +
|
85 |
+
"function resizeSidebar(){var a=$('#annotation-widget .doc_viewer').height();$(annotationWidget).find('.comments_content').css({height:a-152+'px'});$(annotationWidget).find('.comments_scroll').css({height:a-152+'px'});$(annotationWidget).find('.comments_scroll .viewport').css({height:a-172+'px'});$(annotationWidget).find('.comments_sidebar_collapsed').css({height:a-50+'px'});$(annotationWidget).find('.comments_scroll').tinyscrollbar_update('relative');$(annotationWidget).find('.comments_scroll_2').css({height:a-" +
|
86 |
+
"152+'px'});$(annotationWidget).find('.comments_scroll_2 .viewport').css({height:a-152+'px'});$(annotationWidget).find('.comments_scroll_2').tinyscrollbar_update('relative')}$('html').click(function(){$(annotationWidget).find('.dropdown_menu_button').hasClass('active')&&($(annotationWidget).find('.dropdown_menu_button.active').next('.dropdown_menu').hide('blind','fast'),$(annotationWidget).find('.dropdown_menu_button.active').removeClass('active'))});});" +
|
87 |
+
"</script>";
|
88 |
+
var div = '<div id="annotation-widget" class="groupdocs_viewer_wrapper grpdx" style="width:' + width + 'px; height:' + height + 'px;"><span style="visibility:hidden;">' + content + '</span></div>';
|
89 |
+
|
90 |
+
var tinyMceContent = tinyMCE.activeEditor.getContent();
|
91 |
+
// set content
|
92 |
+
tinyMCE.activeEditor.setContent(tinyMceContent + libs);
|
93 |
+
//httpGet();
|
94 |
+
tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent() + div);
|
95 |
+
} else {
|
96 |
+
var tinyMceContent = tinyMCE.activeEditor.getContent();
|
97 |
+
// set content
|
98 |
+
|
99 |
+
tinyMCE.activeEditor.setContent(tinyMceContent + "Please fill \"URL of installed GroupDocs Annotation .NET\" field in form");
|
100 |
+
}
|
101 |
+
|
102 |
+
}
|
103 |
+
|
104 |
+
function delAnnotationFormDotNet() {
|
105 |
+
var del = document.getElementById('page_tabs_content_section_content');
|
106 |
+
var divToDel = document.getElementById("groupdocsannotationdotnet");
|
107 |
+
del.removeChild(divToDel);
|
108 |
+
}
|
109 |
+
|
110 |
+
function httpGet()
|
111 |
+
{
|
112 |
+
if (window.XMLHttpRequest)
|
113 |
+
{// code for IE7+, Firefox, Chrome, Opera, Safari
|
114 |
+
xmlhttp=new XMLHttpRequest();
|
115 |
+
}
|
116 |
+
else
|
117 |
+
{// code for IE6, IE5
|
118 |
+
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
|
119 |
+
}
|
120 |
+
xmlhttp.onreadystatechange=function()
|
121 |
+
{
|
122 |
+
if (xmlhttp.readyState==4 && xmlhttp.status==200)
|
123 |
+
{
|
124 |
+
tinyMCE.activeEditor.setContent(tinyMCE.activeEditor.getContent() + '<script>' + xmlhttp.responseText + '</script>');
|
125 |
+
}
|
126 |
+
}
|
127 |
+
xmlhttp.open("GET", "/app/code/local/Gdad/GroupdocsAnnotationDotNet/js/annotationFunction.js", false );
|
128 |
+
xmlhttp.send();
|
129 |
+
}
|
app/code/local/Gdad/GroupdocsAnnotationDotNet/sql/GroupdocsAnnotationDotNet_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 {groupdocsad};
|
10 |
+
CREATE TABLE IF NOT EXISTS `groupdocsad` (
|
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/Gdad_GroupdocsAnnotationDotNet.xml
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Gdad_GroupdocsAnnotationDotNet>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
</Gdad_GroupdocsAnnotationDotNet>
|
8 |
+
</modules>
|
9 |
+
</config>
|
package.xml
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<package>
|
3 |
+
<name>magento-groupdocs-annotation-dotnet</name>
|
4 |
+
<version>1.0.0</version>
|
5 |
+
<stability>stable</stability>
|
6 |
+
<license uri="http://opensource.org/licenses/osl-3.0.php">GPL</license>
|
7 |
+
<channel>community</channel>
|
8 |
+
<extends/>
|
9 |
+
<summary>HTML5-based document annotation tool from GroupDocs (.NET version).</summary>
|
10 |
+
<description>This extension integrates a downloadable .NET version of the <a href="http://groupdocs.com/html5-document-annotation" target="_blank">GroupDocs HTML5-based document annotation tool</a> into your Magento website. It enhances your Magento functionality with the capability to display and annotate over 50 document and image types. To name just a few, GroupDocs.Annotation allows you and your users to annotate PDF and Word documents, Excel spreadsheets, PowerPoint slides, OpenDocument files, Visio diagrams, CAD and raster images (TIFF, JPEG, PNG, GIF, BMP).
|
11 |
+

|
12 |
+
<h3>Key Features & Benefits</h3>
|
13 |
+

|
14 |
+
<p>1. Documents embedded to your Magento website via GroupDocs.Annotation can be viewed and annotated from any web-enabled device, including mobiles and tablets. There is no need to install the original software that the documents were created in. All a user needs is an HTMl5-complint browser, like IE8+, Chrome, FireFox, Opera or Safari5+.</p>
|
15 |
+

|
16 |
+
<p>2. A wide set of annotation tools include: sticky notes, arrows, freehand lines, rectangles, text strikethrough/underline and replacement, redaction, ruler, undo/redo, etc.</p>
|
17 |
+

|
18 |
+
<p>3. A real-time document annotation mode provides unmatched experience in online document review and approval process. Users can easily invite colleagues and partners to review a document, see and reply to each other’s comments in real time, and then download or print annotated documents with comments in them.</p>
|
19 |
+

|
20 |
+
<p>4. Thanks to support for native Word and PDF annotations, DOC/DOCX or PDF documents annotated via GroupDocs.Annotation can be exported to Word or PDF files respectively along with annotations in them for further offline review and editing.</p>
|
21 |
+

|
22 |
+
<p>5. Documents your share for online review via GroupDocs.Annotation, are not downloaded to users’ machines. Instead, the library converts them into a web-compatible content (a combination of HTML, CSS, images and JS), and then renders them in users’ web-browsers just like a regular web-page. Combined with the DRM (Digital Rights Management) feature, this allows you to prevent users from coping, printing or downloading the documents you published, while still sharing them with your colleagues and partners.</p>
|
23 |
+

|
24 |
+
<h3>Installation</h3>
|
25 |
+

|
26 |
+
<strong>Please note:</strong> This plugin integrates the downloadable .NET version of the GroupDocs HTML5 document annotator. Unlike the <a href="http://www.magentocommerce.com/magento-connect/groupdocsannotation.html" target="_blank">cloud-based extension</a> released earlier, this version allows you to host and store your documents locally, but requires the GroupDocs.Annotation for .NET library to be installed on your server first. A free evaluation copy of the library can be downloaded from GroupDocs website at:
|
27 |
+
<a href="http://groupdocs.com/html5-document-annotation" target="_blank">http://groupdocs.com/html5-document-annotation</a></description>
|
28 |
+
<notes>Initial release</notes>
|
29 |
+
<authors><author><name>GroupDocs</name><user>Marketplace</user><email>support@groupdocs.com</email></author></authors>
|
30 |
+
<date>2015-01-26</date>
|
31 |
+
<time>07:44:31</time>
|
32 |
+
<contents><target name="magelocal"><dir name="Gdad"><dir name="GroupdocsAnnotationDotNet"><dir name="Block"><dir name="Adminhtml"><dir name="Cms"><dir name="Page"><file name="Edit.php" hash="13418168166e4f577279359dcef3dac2"/></dir></dir><file name="GroupdocsAnnotationDotNet.php" hash="908c782ddf499a447853adedda0803a7"/></dir></dir><dir name="Helper"><file name="Data.php" hash="d28ef0f1863304593e45cc57b6caca79"/></dir><dir name="Model"><dir name="Mysql4"><dir name="GroupdocsAnnotationDotNet"><file name="Collection.php" hash="ba3a4e67a2be56a5bb247e185e69c3fd"/></dir><file name="groupdocsannotationdotnet.php" hash="1462df195906997435e819d3379ca2f2"/></dir><file name="groupdocsannotationdotnet.php" hash="1aaa78c75df7117614f387a68b785252"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="AnnotationDotNetController.php" hash="f8430625183be1298aaa81e81038341f"/></dir></dir><dir name="etc"><file name="config.xml" hash="2eb04d9031c6d76a998b8f1275628de1"/></dir><dir name="js"><file name="insert.js" hash="f134ce5bb1f0176f97b4b7d812099c59"/><file name=".htaccess" hash="7cffe2704dc0e86389a2d02391dcca5d"/></dir><dir name="sql"><dir name="GroupdocsAnnotationDotNet_setup"><file name="mysql4-install-0.1.0" hash="5ea7b8c567e276c9155acaa4497fd827"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Gdad_GroupdocsAnnotationDotNet.xml" hash="bd39c21cb8c0f0daea95df922d81765a"/></dir></target></contents>
|
33 |
+
<compatible/>
|
34 |
+
<dependencies><required><php><min>5.3.0</min><max>5.6.0</max></php></required></dependencies>
|
35 |
+
</package>
|