This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $json['title'] = "Documents JSON"; | |
| $json['description'] = "All the documents per company"; | |
| $json['generator'] = "https://xxxxx.com/"; | |
| $json['documents'] = array(); | |
| foreach($docs as $doc) { | |
| Debug::toLog($doc->getId()); | |
| $json['documents'][$doc->getId()]['id'] = $doc->getId(); | |
| $json['documents'][$doc->getId()]['groupId'] = $doc->getDocumentGroupId(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Flashes a color over the element for a duration of time | |
| * @param flashColor | |
| * @param duration | |
| */ | |
| flash: function(flashColor, duration) { | |
| var flashBackground = flashColor || "#f2ffed", | |
| animateMs = duration || 1500; | |
| this.stop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Flashes a color over the element for a duration of time | |
| * @param flashColor | |
| * @param duration | |
| */ | |
| flash: function(flashColor, duration) { | |
| var flashBackground = flashColor || "#f2ffed", | |
| animateMs = duration || 1500; | |
| this.stop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $.fn.setupFilterInput = function(callback) { | |
| var $input = $(this), | |
| $searchX = $input.parent().find("#x-icon"); | |
| $input.focus(function(event) { | |
| if(this.value == $input.prop("placeholder")) | |
| this.value = ""; | |
| }).blur(function(event) { | |
| if(!this.value || this.value == "") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //this sets up the entire filter-bar defaults with events | |
| $search.setupPlaceHolder() | |
| .setupFilterInput(function(event) { | |
| dPager.search = event.target.value; | |
| }) | |
| .setupFilterOptions(function(event) { | |
| dPager.filterGroup = $(event.target).data("group-id"); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Documents Pagination Class | |
| * @param containerEl | |
| * @constructor | |
| */ | |
| function DocumentsPager(containerEl) { | |
| this.containerEl = containerEl; | |
| this.jsonLoaded = false; | |
| this.json = null; | |
| this.searchQuery = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $json['title'] = "Documents JSON"; | |
| $json['description'] = "All the documents per company"; | |
| $json['generator'] = "https://xxxxx.com/"; | |
| $json['documents'] = array(); | |
| foreach($docs as $doc) { | |
| $json['documents'][] = array( | |
| 'id' => $doc->getId(), | |
| 'groupId' => $doc->getDocumentGroupId(), | |
| 'groupName' => $doc->getDocumentGroup()->getName(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $json['title'] = "Documents JSON"; | |
| $json['description'] = "All the documents per company"; | |
| $json['generator'] = "https://xxxxx.com/"; | |
| $json['documents'] = array(); | |
| foreach($docs as $key => $doc) { | |
| $json['documents'][] = array( | |
| 'id' => $doc->getId(), | |
| 'groupId' => $doc->getDocumentGroupId(), | |
| 'groupName' => $doc->getDocumentGroup()->getName(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.searchedJson.documents = _.filter(this.json.documents, function(doc) { | |
| return ( | |
| _.isArray(doc.nickname.match(searchRegExp)) | |
| || _.isArray(doc.docRelations[].firstName.match(searchRegExp)) //array | |
| ); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Documents Pagination Class | |
| * @param containerEl | |
| * @constructor | |
| */ | |
| function DocumentsPager(containerEl) { | |
| this.containerEl = containerEl; | |
| this.template = _.template($("#documents-template").html()); | |
| this.jsonLoaded = false; | |
| this.json = null; |