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
/** | |
* Terminal Animation snippet | |
* taken from: | |
* http://lotusrb.org/ | |
* http://lotusrb.org/javascripts/application.js | |
**/ | |
// Typing terminal animation | |
$(window).load(function(){ | |
var version = $('meta[name=lotusrb-version]').attr('content'); |
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
Verifying that +benoror is my openname (Bitcoin username). https://onename.com/benoror |
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
"schema": { | |
"type": "object", | |
"title": "CONTROLS_Basic", | |
"properties": { | |
"Id": { | |
"title": "Id", | |
"type": "string", | |
"required": true, | |
"maxLength": 10, | |
"format": "", |
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
.run(function config(formlyConfig) { | |
formlyConfig.templateManipulators.preWrapper.push(function(template, options, scope) { | |
var heritage = getHeritage(options.type); | |
if (heritage.indexOf('money') !== -1) { | |
console.log(options) | |
options.templateOptions.addonLeft = { | |
text: '$' | |
} | |
return 'THIS IS AN INPUT!' + template; | |
} |
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
'use strict'; | |
/** | |
* Custom Templates for angular-formly | |
*/ | |
angular.module('panaxuiApp') | |
.config(function config(formlyConfigProvider) { | |
/* | |
input |
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
<ui-select ng-model="model[options.key]" theme="bootstrap" reset-search-input="false"> | |
<ui-select-match>{{$select.selected[to.labelProp || 'name']}}</ui-select-match> | |
<ui-select-choices repeat="option in to.options | filter: $select.search"> | |
<div ng-bind-html="option[to.labelProp || 'name'] | highlight: $select.search"></div> | |
</ui-select-choices> | |
</ui-select> |
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
<ui-select ng-model="model[options.key]" theme="bootstrap" ng-required="{{to.required}}" ng-disabled="{{to.disabled}}" reset-search-input="false"> | |
<ui-select-match placeholder="{{to.placeholder}}"> | |
{{$select.selected[to.labelProp || 'name']}} | |
</ui-select-match> | |
<ui-select-choices group-by="to.groupBy" repeat="option[to.valueProp || 'value'] as option in to.options | filter: $select.search"> | |
<div ng-bind-html="option[to.labelProp || 'name'] | highlight: $select.search"></div> | |
</ui-select-choices> | |
</ui-select> |
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
// Calling this method a few times rapidly woudl casue ECONNCLOSED | |
Class.prototype.getCatalogOptions = function(args, callback) { | |
var that = this; | |
sql.connect(that.config.db, function (err) { | |
if (err) | |
return callback(err); | |
var sql_req = new sql.Request(); | |
var sql_str = 'EXEC [$Table].getCatalogOptions @@userId=' + args.userId + ", @catalogName='" + args.catalogName + "', " + |
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
var dirtyFieldsIterator = function(obj, model) { | |
angular.forEach(obj, function (el) { | |
// fields | |
if(el.fields) { | |
fieldIterator(el.fields, model); | |
} | |
// fieldGroup | |
if(el.fieldGroup) { | |
// Nested model | |
if(el.model) { // Model $eval at runtime |
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
/* | |
Main `abstract` root state | |
*/ | |
.state('main', { | |
abstract: true, | |
templateUrl: 'views/main.html', | |
controller: 'MainCtrl' | |
}) | |
/* | |
Home state |