From 0d31ccd62d54991a1fd1eae0d9d40d7111002951 Mon Sep 17 00:00:00 2001 From: Seven Du Date: Tue, 4 Jun 2013 09:52:14 +0800 Subject: [PATCH] add show complete --- htdocs/portal/assets/js/fsportal.js | 24 +++++++++++++++++ htdocs/portal/index.html | 41 +++++++++++++++++++++++++++-- 2 files changed, 63 insertions(+), 2 deletions(-) diff --git a/htdocs/portal/assets/js/fsportal.js b/htdocs/portal/assets/js/fsportal.js index 445960b8b6..32c3b24703 100644 --- a/htdocs/portal/assets/js/fsportal.js +++ b/htdocs/portal/assets/js/fsportal.js @@ -136,6 +136,12 @@ App.ShowAliasesRoute = Ember.Route.extend({ } }); +App.ShowCompletesRoute = Ember.Route.extend({ + setupController: function(controller) { + App.showCompletesController.load(); + } +}); + App.ShowManagementsRoute = Ember.Route.extend({ setupController: function(controller) { App.showManagementsController.load(); @@ -195,6 +201,7 @@ App.Router.map(function(){ this.route("showFiles"); this.route("showAPIs"); this.route("showAliases"); + this.route("showCompletes"); this.route("showManagements"); this.route("showSays"); this.route("showChats"); @@ -509,6 +516,23 @@ App.showAliasesController = Ember.ArrayController.create({ } }); +App.showCompletesController = Ember.ArrayController.create({ + content: [], + init: function(){ + }, + load: function() { + var me = this; + $.getJSON("/txtapi/show?complete%20as%20json", function(data){ + me.set('total', data.row_count); + me.content.clear(); + if (data.row_count == 0) return; + + me.pushObjects(data.rows); + + }); + } +}); + App.showManagementsController = Ember.ArrayController.create({ content: [], init: function(){ diff --git a/htdocs/portal/index.html b/htdocs/portal/index.html index a9248a4a66..9fbcef2963 100644 --- a/htdocs/portal/index.html +++ b/htdocs/portal/index.html @@ -299,6 +299,44 @@ + +