README is empty
This file contains 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
module('wizehive').controller('DataCntl', function($scope) { | |
$scope.applyViewToSorts = function(dataView) { | |
angular.forEach(dataView.sortByFields, function(sort) { | |
// Find the column for this field and mark the sort order | |
var colDef = findColumn(field); | |
colDef.sortDirection = sort[direction]; | |
$scope.gridOptions.sortBy(field); | |
}); | |
}; | |
This file contains 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
<?php | |
private function isVirtualRelation($model, $relation_name) { | |
if (isset($model->actsAs['VirtualHabtm.VirtualHabtm'])) { | |
foreach($model->actsAs['VirtualHabtm.VirtualHabtm']['fields'] as $field => $def) { | |
if ($def['joinModel'] == $relation_name) return true; | |
} | |
} | |
return false; | |
} | |
This file contains 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
<?php | |
// Assume that FormPermissionBehavior has already run, so we already know we have form-level access | |
$form_index = array(); | |
$filter_result_index = array(); | |
$workspace_memberships = $this->__userWorkspaceRoles(); | |
// Something like... | |
$workspace_memberships = array( |
This file contains 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
<?php | |
function beforeSave() { | |
$current_role_id; // = something... role that was set to false | |
foreach($data['read'] as $role_id => $value) { | |
if ($value == false) { | |
$record_permission_data = $this->RecordPermission->find(array( | |
'conditions' => array( | |
'scope' => $this->data['scope'] . '.Records' | |
) | |
)); |
This file contains 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
$scope.checkStatus = function () { | |
//get import job details | |
Data('RecordImportJobs').query({ id: $scope.recordImportJobId }, function (importJob) { | |
//check if job is under process | |
if (importJob.completed !== null || importJob.completed == 'null') { //job is completed | |
///close modal only if data is imported or file has invalid records | |
if ($scope.validate == 'only' && importJob.errors !== null) { | |
// DO WHATEVER YOU NEED TO DO TO SHOW THE ERRORS, e.g. | |
$scope.$emit('modal-close'); | |
$scope.importCallback(importJob); |
This file contains 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
columns = [ | |
{ | |
field: 'folder.name', | |
displayName: 'Folder', | |
width: 200, | |
enableCellEdit: false, | |
groupable: true, | |
visible: false, | |
sortFn: Model.makeSortFunction(currentFolders) | |
} |
This file contains 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
// FOLLOWING LINES ARE PREPENDED VERBATIM TO THE FILE BY SERVER --> | |
(function(pluginName, plugin) { | |
var wizehive = null; | |
var angular = null; | |
plugin.currentPluginName = pluginName; | |
// <-- END SERVER PREPENDING | |
// DUMP YOUR JS CODE HERE - sample plugin code: --> |
This file contains 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
angular.module('wizehive-plugins') | |
.directive('wh-plugin-container', [function() { | |
return { | |
scope: { | |
pluginName: '=' | |
}, | |
controller: function($scope) { | |
this.name = $scope.pluginName; // AwesomePlugin | |
} | |
}; |
This file contains 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
wizehive.controller('DataCntl', ['$scope', 'PluginCommunication', function($scope, PluginCommunication) { | |
// Send record data | |
$scope.$watch('record', function(record) { | |
PluginCommunication.$broadcast('data-cntl-record', record); | |
}); | |
// Get record data from plugin | |
PluginCommunication.$on('DataCntl.record-update', function(evt, record) { | |
$scope.record = record; | |
}); |
OlderNewer