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
var get = Ember.get; | |
/** | |
@extends Ember.Mixin | |
Implements common pagination management properties for controllers. | |
*/ | |
Ember.PaginationSupport = Ember.Mixin.create({ | |
/** | |
*/ |
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
$.post('data/Ajax.php', {'class': 'Catalogue', method: 'loadAttributeSelectedItems', params: ['none']}, function(data) { | |
var splitloads = data.split(','); | |
$(splitloads).each(function(index,attributetreehierarchy) { | |
console.log(attributetreehierarchy); | |
treeattr.loadKeyPath(attributetreehierarchy, function(node, status){ | |
if(status == "loaded") { | |
node.expand(); | |
}else if(status == "ok") { | |
node.activateSilently() |
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
App.DashboardController = Em.ArrayController.extend({ | |
content: [], | |
contentRecent: Em.ArrayController.create({ | |
content: [], | |
count: Em.computed(function() { | |
return this.get('content').length; | |
}).property('content.@each') | |
}), |
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
App.DashboardController = Em.ArrayController.extend({ | |
content: [], | |
// contentRecent: Em.ArrayController.create({ | |
// content: [], | |
// count: Em.computed(function() { | |
// return this.get('content').length; | |
// }).property('content.@each') | |
// }), | |
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
App.Router.map(function() { | |
this.route("dashboard"); | |
this.route("accounts"); | |
this.route("activities"); | |
this.route("catalogue", { path: "/catalogue" }); | |
this.route("opportunities", { path: "/opportunities" }); | |
this.route("incidents", { path: "/incidents" }); | |
// this.resource('processes'); | |
// this.resource('process', { path: '/processes/:processguid' }); |
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
//TEMPLATE | |
{{#linkTo account account}}View{{/linkTo}} | |
//ROUTER | |
App.Router.map(function() { | |
this.resource('accounts', function() { | |
//this.route('account', { path: ':accountguid' }); | |
}); | |
this.resource('account', { path: '/accounts/:accountguid' }); | |
}); |
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
{"total":"8","results":[{"accountguid":"bcfa845bb694d4221fd898e1c81b4f1d56085f75","accountnumber":"","accountname":"Kashif","accounttype":"LEAD","accounttypestatus":"Lead","accountuser":"Clevva Support","accountnumberinline":""},{"accountguid":"1b65fcabc86565260c4439e67d62573b677686f7","accountnumber":"","accountname":"John Smith","accounttype":"LEAD","accounttypestatus":"Lead","accountuser":"Clevva Support","accountnumberinline":""},{"accountguid":"c50c61b9c221c7019073fed36b46d32e4c35232f","accountnumber":"BRE393","accountname":"Peter Bredenkamp","accounttype":"CUSTOMER","accounttypestatus":"Customer","accountuser":"Clevva Support","accountnumberinline":"(BRE393)"},{"accountguid":"97bb7890844082a5c2da49e2ca6c4f17f506c516","accountnumber":"MAV003","accountname":"Admire Mavuto","accounttype":"CUSTOMER","accounttypestatus":"Customer","accountuser":"Clevva Support","accountnumberinline":"(MAV003)"},{"accountguid":"b8395eaf5e5be85208b2f033ea7f9dbb750078f8","accountnumber":"MIC008","accountname":"John Michaels","a |
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
App.Router.map(function() { | |
this.resource("accounts", { path: '/accounts' }); | |
this.resource("account", { path: "/accounts/:accountguid" }); | |
}); | |
App.AccountsRoute = Ember.Route.extend({ | |
setupController: function(controller, model) { | |
controller.set('searchfilter','ALL'); | |
controller.search(); | |
} |
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
App.ActivitiesController = Em.ArrayController.extend(Ember.PaginationSupport,{ | |
viewActivity: function(event) { | |
//console.log("View activity");//.transitionToRoute('accounts'); | |
// console.log(event); | |
} | |
}); |
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
// App.RecentItemsRoute = Ember.Route.extend({ | |
// setupController: function(controller, model) { | |
// console.log('RECENT ITEMS CONTROLLER'); | |
// } | |
// }); | |
// App.Router = Em.Router.extend({ | |
// enableLogging: false, | |
OlderNewer