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
{ | |
// -------------------------------------------------------------------- | |
// JSHint Configuration, Strict Edition | |
// -------------------------------------------------------------------- | |
// | |
// This is a options template for [JSHint][1], using [JSHint example][2] | |
// and [Ory Band's example][3] as basis and setting config values to | |
// be most strict: | |
// | |
// * set all enforcing options to true |
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
link: function(scope, elm, attrs) { | |
elm[0].innerHTML = ""; | |
var newTable = "<table border='1' width='100%'>"; | |
var j = 1; | |
var i = 1; | |
for (; j <= 100; j++) { | |
newTable += "<tr>"; | |
i = 1; | |
for (; i <= 10; i++) { | |
newTable += "<td align='center'>" + String(j + 64) + "</td>"; |
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
module.directive('setValidity', ['$parse', | |
function($parse) { | |
// no need for form. better | |
return { | |
require: "ngModel", | |
scope: { | |
'setValidity': '=setValidity', | |
'ngDisabled': '=ngDisabled' | |
}, | |
controller: function($scope, $element, $attrs, $transclude) { |
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
module.directive('xngDisabled', function($parse) { | |
return { | |
restrict: 'A', | |
scope: { | |
xngDisabled : "@" | |
}, | |
link: function (scope, element, attrs, ctrl) { | |
var setDisable = function (el, disable){ | |
if(disable === "true") { | |
//condition-disabled |
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
module.filter('cutTree', [ | |
function() { | |
return function(tree) { | |
var res = []; | |
var i = 0; | |
angular.forEach(tree, function(tree1) { | |
var level1 = {}; | |
var level2 = []; | |
angular.forEach(tree.children, function(tree2) { |
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
define(['directives/directives-module'], function(module) { | |
module.directive('xngTooltip', function($parse) { | |
return { | |
restrict: 'A', | |
priority: 0, | |
scope: true, | |
link: function postLink(scope, element, attrs, ctrl) { | |
var getter = $parse(attrs.xngTooltip), | |
setter = getter.assign, | |
value = getter(scope); |
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
define(['directives/directive-module', 'morris'], function(module, Morris) { | |
module.directive('xngMorris', function($parse, $compile, $interval) { | |
return { | |
restrict: 'A', | |
scope: true, | |
controller: function($scope, $element, $attrs, $transclude) { | |
var morris; | |
// var isDataSet = false; |
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
define(['resources/resources-module'], function(module) { | |
module.factory('lolRSRC', ['customResource', '$rootScope', '$q', | |
function(customResource, $rootScope, $q) { | |
var defer = $q.defer(); | |
$rootScope.$on('$locationChangeSuccess', function(){ | |
test.test(); | |
}); | |
var test = customResource( | |
apiUrl + "fafeeafe/:item", { |
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
(function(window, angular, document, undefined) { | |
'use strict'; | |
angular.module('mmResource', ['ng', 'ngResource']). | |
provider('mmResource', function(){ | |
var common = this.common = { | |
retryTimeout : 4000, | |
retryMax: 3 | |
}; |
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
module.filter('setDayApart', function() { | |
return function(input) { | |
var res = []; | |
var dayBefore; | |
angular.forEach(input, function(row, key) { | |
if (row.day !== dayBefore) { | |
row.newDay = true; | |
} | |
res.push(row); | |
dayBefore = row.day; |