GroupDocsSignature - Version 1.0.0

Version Notes

Inital version with basics functions

Download this release

Release Info

Developer GroupDocs
Extension GroupDocsSignature
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/local/Gdsig/Groupdocssignature/Block/Adminhtml/Cms/Page/Edit.php ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script>
2
+ // Insert GroupDocs File ID at cms edit page
3
+ function gdfileid(){
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
+ }
21
+ }
22
+ }
23
+ // Enter GroupDocs File ID
24
+ var ans=prompt('Enter GroupDocs Form ID:','');
25
+ if(ans.length<30) { alert('Sorry, but this Form ID is too short'); return false; }
26
+ if(ans.length>70) { alert('Sorry, but this Form ID is too big'); return false; }
27
+ // all good continue
28
+ var cmsName = 'Magento'
29
+ var cmsVersion = '1.7'
30
+ var iframe = '<iframe src="https://apps.groupdocs.com/signature/forms/SignEmbed/'+ans+'?&referer='+cmsName+'/'+cmsVersion+'" frameborder="0" width="600" height="400"></iframe>';
31
+ var tinyMceContent = tinyMCE.activeEditor.getContent();
32
+ // set content
33
+ tinyMCE.activeEditor.setContent(tinyMceContent+iframe);
34
+
35
+
36
+ }
37
+ </script>
38
+ <?php
39
+ class Gdsig_Groupdocssignature_Block_Adminhtml_Cms_Page_Edit extends Mage_Adminhtml_Block_Cms_Page_Edit {
40
+ public function __construct() {
41
+
42
+ parent::__construct();
43
+
44
+ $this->_addButton('button_id', array(
45
+ 'label' => Mage::helper('cms')->__('GroupDocs Signature File ID'),
46
+ 'onclick' => 'gdfileid()',
47
+ 'class' => 'go'
48
+ ), 0, 100, 'footer', 'header');
49
+ }
50
+ }
app/code/local/Gdsig/Groupdocssignature/Block/Adminhtml/Groupdocssignature.php ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Gdsig_Groupdocssignature_Block_Adminhtml_Groupdocssignature extends Mage_Adminhtml_Block_Template {
4
+
5
+
6
+
7
+ }
app/code/local/Gdsig/Groupdocssignature/Helper/Data.php ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
1
+ <?php
2
+
3
+ class Gdsig_Groupdocssignature_Helper_Data extends Mage_Core_Helper_Abstract {
4
+
5
+ }
app/code/local/Gdsig/Groupdocssignature/Model/Mysql4/Groupdocssignature/Collection.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Gdsig_Groupdocssignature_Model_Mysql4_Groupdocssignatrue_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
+ {
5
+ public function _construct()
6
+ {
7
+ $this->_init('groupdocssignature/groupdocssignature');
8
+ }
9
+ }
app/code/local/Gdsig/Groupdocssignature/Model/Mysql4/groupdocssignature.php ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gdsig_Groupdocssignature_Model_Mysql4_Groupdocssignatrue extends Mage_Core_Model_Mysql4_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ $this->_init('groupdocssignature/groupdocssignature', 'id');
7
+ }
8
+ }
app/code/local/Gdsig/Groupdocssignature/Model/groupdocssignature.php ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class Gdsig_Groupdocssignature_Model_Groupdocssignature extends Mage_Core_Model_Abstract
3
+ {
4
+ public function _construct()
5
+ {
6
+ parent::_construct();
7
+ $this->_init('groupdocssignature/groupdocssignature');
8
+ }
9
+ }
app/code/local/Gdsig/Groupdocssignature/controllers/Adminhtml/SignatureController.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Gdsig_Groupdocssignature_Adminhtml_SignatureController 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('viewer');
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('groupdocsassembly/groupdocsassembly')->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/Gdsig/Groupdocssignature/etc/config.xml ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Gdsig_Groupdocssignature>
5
+ <version>0.1.0</version>
6
+ </Gdsig_Groupdocssignature>
7
+ </modules>
8
+
9
+ <global>
10
+
11
+ <blocks>
12
+ <adminhtml>
13
+ <rewrite>
14
+ <cms_page_edit>Gdsig_Groupdocssignature_Block_Adminhtml_Cms_Page_Edit</cms_page_edit>
15
+ </rewrite>
16
+ </adminhtml>
17
+ </blocks>
18
+
19
+
20
+ <models>
21
+ <groupdocssignature>
22
+ <class>Gdsig_Groupdocssignature_Model</class>
23
+ <resourceModel>groupdocssignature_mysql4</resourceModel>
24
+ </groupdocssignature>
25
+ <groupdocssignature_mysql4>
26
+ <class>Gdass_Groupdocsassembly_Model_Mysql4</class>
27
+ <entities>
28
+ <groupdocssignature>
29
+ <table>groupdocssig</table>
30
+ </groupdocssignature>
31
+ </entities>
32
+ </groupdocssignature_mysql4>
33
+ </models>
34
+ <resources>
35
+ <groupdocssignature_write>
36
+ <connection>
37
+ <use>core_write</use>
38
+ </connection>
39
+ </groupdocssignature_write>
40
+
41
+ <groupdocssignature_read>
42
+ <connection>
43
+ <use>core_read</use>
44
+ </connection>
45
+ </groupdocssignature_read>
46
+
47
+ <groupdocssignature_delete>
48
+ <connection>
49
+ <use>core_delete</use>
50
+ </connection>
51
+ </groupdocssignature_delete>
52
+ </resources>
53
+
54
+
55
+
56
+
57
+
58
+ <blocks>
59
+ <groupdocssignature>
60
+ <class>Gdsig_Groupdocssignature_Block</class>
61
+ </groupdocssignature>
62
+ </blocks>
63
+ <helpers>
64
+ <groupdocssignature>
65
+ <class>Gdsig_Groupdocssignature_Helper</class>
66
+ </groupdocssignature>
67
+ </helpers>
68
+ </global>
69
+
70
+ <admin>
71
+ <routers>
72
+ <groupdocssignature>
73
+ <use>admin</use>
74
+ <args>
75
+ <module>Gdsig_Groupdocssignature</module>
76
+ <frontName>groupdocssignature</frontName>
77
+ </args>
78
+ </groupdocssignature>
79
+ </routers>
80
+ </admin>
81
+
82
+ <adminhtml>
83
+
84
+ <menu>
85
+ <catalog>
86
+ <children>
87
+ <groupdocssignature_adminform translate="title" module="groupdocssignature">
88
+ <title>Groupdocs Viewer</title>
89
+ <action>groupdocssignature/adminhtml_viewer</action>
90
+ </groupdocssignature_adminform>
91
+ </children>
92
+ </catalog>
93
+ </menu>
94
+
95
+ <acl>
96
+ <resources>
97
+ <admin>
98
+ <children>
99
+ <catalog>
100
+ <children>
101
+ <groupdocssignature_adminform>
102
+ <title>Groupdocs Signature</title>
103
+ </groupdocssignature_adminform>
104
+ </children>
105
+ </catalog>
106
+ </children>
107
+ </admin>
108
+ </resources>
109
+ </acl>
110
+
111
+ <layout>
112
+ <updates>
113
+ <groupdocssignature>
114
+ <file>groupdocssignature.xml</file>
115
+ </groupdocssignature>
116
+ </updates>
117
+ </layout>
118
+ </adminhtml>
119
+ </config>
app/code/local/Gdsig/Groupdocssignature/sql/Groupdocssignature_setup/mysql4-install-0.1.0 ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 {groupdocssig};
10
+ CREATE TABLE IF NOT EXISTS `groupdocsass` (
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
+ `client_id` varchar(255) DEFAULT NULL,
19
+ `api_key` varchar(255) DEFAULT NULL,
20
+ `iframe` varchar(255) DEFAULT NULL,
21
+ `file_id` varchar(255) DEFAULT NULL,
22
+ PRIMARY KEY (`id`)
23
+ ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
24
+
25
+ ");
26
+
27
+ $installer->endSetup();
app/etc/modules/Gdsig_Groupdocssignature.xml ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Gdsig_Groupdocssignature>
5
+ <active>true</active>
6
+ <codePool>local</codePool>
7
+ </Gdsig_Groupdocssignature>
8
+ </modules>
9
+ </config>
package.xml ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>GroupDocsSignature</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://www.opensource.org/licenses/gpl-license.php">GPL</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Save time by collecting signatures online, directly from your webpages.</summary>
10
+ <description>GroupDocs Signature is an efficient digital signature service that is completely web-based. With it, you can collect signatures online by embedding documents into web pages as digital forms. Once a form is embedded, signers apply an electronic signature.&#xD;
11
+ &#xD;
12
+ GroupDocs' easy-to-use electronic signature service lets you collect digital signatures without the administrative overhead of printing, envelope stuffing and posting. It saves time and effort. First, simply add fields and prepare your documents for signing. You can prepare any number of signature forms with fields for signature, date, initials, etc. using the Signature app at GroupDocs.com.Then share the forms with the people who needs to sign them. The signers sign the documents online in a browser. As soon as the document is signed, you are notified.&#xD;
13
+ &#xD;
14
+ After installing the extension, embed forms to your web pages. To embed signature forms you only need the form's ID. Your customers can now sign documents online directly on your website.&#xD;
15
+ &#xD;
16
+ GroupDocs Signature gives you a greener, paperless office.</description>
17
+ <notes>Inital version with basics functions</notes>
18
+ <authors><author><name>GroupDocs</name><user>Marketplace</user><email>marketplace@groupdocs.com</email></author></authors>
19
+ <date>2013-02-18</date>
20
+ <time>12:37:16</time>
21
+ <contents><target name="magelocal"><dir><dir name="Gdsig"><dir name="Groupdocssignature"><dir name="Block"><dir name="Adminhtml"><dir name="Cms"><dir name="Page"><file name="Edit.php" hash="3047750a0629d0a0431e01de7976e7a9"/></dir></dir><file name="Groupdocssignature.php" hash="30358212a727e665868361eab27b6f35"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="SignatureController.php" hash="7cb041f53477dd7b88f9e03963135d9a"/></dir></dir><dir name="etc"><file name="config.xml" hash="fcbf91b6b9ccf67c227eb22885158179"/></dir><dir name="Helper"><file name="Data.php" hash="8d7f119893c87511ec4bd6139bd943ed"/></dir><dir name="Model"><dir name="Mysql4"><dir name="Groupdocssignature"><file name="Collection.php" hash="28444492a1caf3213261fc8503cbff3b"/></dir><file name="groupdocssignature.php" hash="d8ca5823683723457d4b6829c8ce3e22"/></dir></dir><dir name="sql"><dir name="Groupdocssignature_setup"><file name="mysql4-install-0.1.0" hash="0a0e529d575920f87c551b611f47e92f"/></dir></dir></dir></dir></dir><dir name="Gdsig"><dir name="Groupdocssignature"><dir name="Model"><dir name="Mysql4"><file name="groupdocssignature.php" hash="d8ca5823683723457d4b6829c8ce3e22"/></dir><file name="groupdocssignature.php" hash="8afc8007895451819d39b6eb2f5815b6"/></dir></dir></dir></target><target name="mageetc"><dir><dir name="modules"><file name="Gdsig_Groupdocssignature.xml" hash="cafd7ba19f5854a235cf3f78bafba886"/></dir></dir></target></contents>
22
+ <compatible/>
23
+ <dependencies><required><php><min>5.3.0</min><max>5.4.0</max></php></required></dependencies>
24
+ </package>