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
/*global angular*/ | |
(function () { | |
'use strict'; | |
angular.module('reportServices').service('Persistence', function ($injector) { | |
this.transform = function transform(data) { | |
try { | |
if (angular.isObject(data)) { | |
data = JSON.stringify(data); |
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
/*global angular*/ | |
(function () { | |
'use strict'; | |
/** | |
* @ngdoc directive | |
* @name placeholder.directive:placeholder | |
* @todo FIX the example so the demo works. How? I don't know. | |
* @description | |
* Provides an empty placeholder for a SELECT tag. Should work with |
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
schema.controller('ListMixinCtrl', function ($scope, config) { | |
$scope.noOfPages = Math.ceil(config.list.length / PAGE_LENGTH); | |
$scope.currentPage = $scope.currentPage || 1; | |
$scope.$watch('currentPage', function (page) { | |
if (config.list) { | |
$scope.begin = (page - 1) * PAGE_LENGTH; | |
$scope.end = $scope.begin + PAGE_LENGTH; | |
} |
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
/*global angular*/ | |
(function () { | |
'use strict'; | |
var ladda = angular.module('ladda', []); | |
/** | |
* @ngdoc directive | |
* @restrict A | |
* @author Dean Sofer |
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
'use strict'; | |
describe('Module: ladda', function () { | |
beforeEach(function () { | |
module('ladda'); | |
}); | |
describe('Directive: ladda', function () { | |
var markup = '<button ladda="foo"></button>', |
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
<script type="text/ng-template" id="ladda"> | |
<button data-spinner-size="30" type="submit" class="btn ladda-button" | |
style="overflow: visible;" data-style="zoom-in"><span | |
class="ladda-label" ng-transclude></span></button> | |
</script> |
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
/*global angular*/ | |
(function () { | |
'use strict'; | |
angular.module('ultron.common').filter('titleCase', function () { | |
return function titleCase(text) { | |
var words = text.split(' '); | |
var wordCount = words.length; | |
for (var i = 0; i < wordCount; i++) { |
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
/*global angular*/ | |
(function () { | |
'use strict'; | |
/** | |
* Takes a promise, and if it is rejected, displays an ERROR in a popup!! | |
* | |
* attempt($http.post(url, data).then(function successCallback(promise) { .. }, | |
* function failureCallback(promise) { .. })); | |
* |
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
/** | |
* Enhanced Select2 Dropmenus | |
* | |
* @AJAX Mode - When in this mode, your value will be an object (or array of objects) of the data used by Select2 | |
* This change is so that you do not have to do an additional query yourself on top of Select2's own query | |
* @params [options] {object} The configuration options passed to $.fn.select2(). Refer to the documentation | |
*/ | |
/* global angular */ | |
angular.module('ui.select2', []).value('uiSelect2Config', {}).directive('uiSelect2', ['uiSelect2Config', '$timeout', '$parse', function (uiSelect2Config, $timeout, $parse) { | |
var options = {}, |
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
#!/usr/bin/env bash | |
# Usage: bash uninstall_vmware.bash | |
remove() { | |
entry="$1" | |
echo -ne "Removing \e[1;34m$entry\e[0m... " | |
sudo rm -rf "$entry" &> /tmp/uninstall-vmware.log | |
if [[ ! -e "$entry" ]]; then | |
echo -e "\e[1;32mOK\e[0m" |