Revert "Dynamic Client Loading Initial Commit"

This reverts commit a4e5335eda02cdb6b32a966d194035429ca52915.
pull/210/head
Michael Jett 2012-09-21 14:58:48 -04:00
parent d7455dba14
commit 2311cdf1f2
3 changed files with 18 additions and 19 deletions

View File

@ -559,23 +559,18 @@
initialize:function () {
this.clientList = new ClientCollection();
this.clientListView = new ClientListView({model:this.clientList});
this.breadCrumbView = new BreadCrumbView({
collection:new Backbone.Collection()
});
this.breadCrumbView.render();
//this.startAfter([this.clientList]);
Backbone.history.start();
},
this.startAfter([this.clientList]);
clientLoadCheck: function() {
// check to see if the client collections are already loaded
// if they aren't then load them
if (!this.clientList || !this.clientListView) {
this.clientList = new ClientCollection();
this.clientListView = new ClientListView({model:this.clientList});
}
},
startAfter:function (collections) {
@ -590,8 +585,6 @@
listClients:function () {
this.clientLoadCheck();
this.breadCrumbView.collection.reset();
this.breadCrumbView.collection.add([
{text:"Home", href:"/"},
@ -605,8 +598,6 @@
newClient:function() {
this.clientLoadCheck();
this.breadCrumbView.collection.reset();
this.breadCrumbView.collection.add([
{text:"Home", href:"/"},
@ -630,8 +621,6 @@
editClient:function(id) {
this.clientLoadCheck();
this.breadCrumbView.collection.reset();
this.breadCrumbView.collection.add([
{text:"Home", href:"/"},
@ -658,8 +647,7 @@
},
whiteList:function () {
$('#content').html(this.whiteListView.render().el);
}
@ -679,7 +667,8 @@
};
// load templates and append them to the body
$.get('resources/template/templates.html', _load);
$.get('resources/template/client.html', _load);
$.get('resources/template/list.html', _load);
jQuery.ajaxSetup({async:true});
app = new AppRouter();

View File

@ -0,0 +1,10 @@
<script type="text/html" id="tmpl-url-list">
<div class="well">
<label>White list
<textarea class="span7" rows="5" id="textarea" class="input-xlarge"></textarea></label>
<span class="help-block">Enter URLs separated by a newline.</span>
<button class="btn">Save</button>
</div>
</script>