Skip to content
This repository has been archived by the owner on May 16, 2018. It is now read-only.

Fixes #374 - Implement Zend_Pdf::getJavascript() and Zend_Pdf::setJavascript() #375

Merged
merged 3 commits into from
Jun 26, 2014

Conversation

adeelnawaz
Copy link
Contributor

Changes:

  • Implementation of setJavaScript() and getJavaScript() added for manipulating document-level JavaScript.
  • Additionally, resetJavaScript() and addJavaScript() methods added.

See the docblocks for all four methods for the description of their operations.
#374 fixed.

Changes:
- Implementation of `setJavaScript()` and `getJavaScript()` added for manipulating document-level JavaScript.
- Additionally, `resetJavaScript()` and `addJavaScript()` methods added.

See the docblocks for all four methods for the description of their operations.

zendframework#374 fixed.
@froschdesign
Copy link
Member

@adeelnawaz
There are some problems:

  • No unit tests.
  • I can not find a signed CLA.
  • Normally, we will not add any new features or functionality for ZF1.

@adeelnawaz
Copy link
Contributor Author

@froschdesign I'll write the tests and submit signed CLA as soon as I get a chance. Can I submit CLA online? or is it accepted as a hard copy only?

Unit tests include:
- Zend_Pdf::getJavascript()
- Zend_Pdf::setJavascript()
- Zend_Pdf::resetJavascript()
- Zend_Pdf::addJavascript()

Added Zend_PdfTest test suite to AllTests.php
@adeelnawaz
Copy link
Contributor Author

@froschdesign unit tests implemented and signed CLA has been emailed.

@adeelnawaz
Copy link
Contributor Author

@froschdesign could you please look into the failed build? It has failed due to someone else's test. The strange thing is that the build test for PHP 5.3 has failed. But it passes on my local machine when run on PHP 5.3.

@froschdesign
Copy link
Member

@akrabat
What do you think? Should we accept these new features?

@froschdesign
Copy link
Member

@adeelnawaz
Build is okay.

class Zend_PdfTest extends PHPUnit_Framework_TestCase
{

public function testGetJavasriptNull()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: should be testGetJavaScript.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had an illusion that Zend_Pdf has methods like Javascript and not JavaScript. I must have mixed it up with another library. I'll fix that asap.

@akrabat
Copy link
Contributor

akrabat commented Jun 25, 2014

Is the JS run by Adobe Reader?

@adeelnawaz
Copy link
Contributor Author

JS is run by almost all PDF readers. Modern browsers support it too.
For instance if you set JavaScript as print();, then opening the file will open the default print window of the reader (Adobe Reader, Chrome, Firefox, etc).

@akrabat
Copy link
Contributor

akrabat commented Jun 25, 2014

I learn something every day :)

@froschdesign, personally, I'm happy for this change to go in, if you are and we're happy that the Travis failure is nothing to do with it.

@froschdesign froschdesign added this to the 1.12.8 milestone Jun 25, 2014
@froschdesign
Copy link
Member

@adeelnawaz
Please have a look on this: #98
Maybe you can help.

Thanks!

froschdesign added a commit that referenced this pull request Jun 26, 2014
Fixes #374 - Implement Zend_Pdf::getJavascript() and Zend_Pdf::setJavascript()
@froschdesign froschdesign merged commit 1a40000 into zendframework:master Jun 26, 2014
@froschdesign froschdesign changed the title Fixes #374 Fixes #374 - Implement Zend_Pdf::getJavascript() and Zend_Pdf::setJavascript() Jun 26, 2014
xopherdeep pushed a commit to xopherdeep/Zend-Framework-v1 that referenced this pull request Jul 3, 2014
Fixes zendframework#374 - Implement Zend_Pdf::getJavascript() and Zend_Pdf::setJavascript()
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants