Yoji SHIDARA
null+****@clear*****
Wed Sep 5 16:19:14 JST 2012
Yoji SHIDARA 2012-09-05 16:19:14 +0900 (Wed, 05 Sep 2012) New Revision: 37bf25f0465443d780feed1cfbb7d67b169ea8a8 https://github.com/groonga/gcs/commit/37bf25f0465443d780feed1cfbb7d67b169ea8a8 Log: ember: partially use ember.js Modified files: public/js/gcs.js views/index.jade views/layout.jade Modified: public/js/gcs.js (+17 -3) =================================================================== --- public/js/gcs.js 2012-09-05 13:54:40 +0900 (ac44b10) +++ public/js/gcs.js 2012-09-05 16:19:14 +0900 (e7e28aa) @@ -1,3 +1,20 @@ +$(document).ready(function($) { + var App = Ember.Application.create(); + + App.ApplicationView = Ember.View.extend({ + templateName: 'application' + }); + + App.Router = Ember.Router.extend({ + root: Ember.Route.extend({ + index: Ember.Route.extend({ + route: '/' + }) + }) + }); + App.initialize(); +}); + var configurationEndpoint = 'http://' + location.host + '/'; var hostAndPort = getHostAndPort(); @@ -121,7 +138,4 @@ $(document).ready(function($) { }); } }); - - $('form#domain').submit(searchExecute); - $('form#search').submit(searchExecute); }); Modified: views/index.jade (+0 -7) =================================================================== --- views/index.jade 2012-09-05 13:54:40 +0900 (9e8add1) +++ views/index.jade 2012-09-05 16:19:14 +0900 (e69de29) @@ -1,7 +0,0 @@ -form#search.form-search - input.search-query(type="text", name="query", value="") - input.btn(type="submit", value="Search") - input(type="hidden", name="start", value="") - -#request-information -#results Modified: views/layout.jade (+19 -11) =================================================================== --- views/layout.jade 2012-09-05 13:54:40 +0900 (0cb1d4c) +++ views/layout.jade 2012-09-05 16:19:14 +0900 (8d9574d) @@ -11,15 +11,23 @@ html link(href="/css/bootstrap.min.css", rel="stylesheet") link(href="/css/gcs.css", rel="stylesheet") + script(data-template-name="application", type="text/x-handlebars") + .navbar.navbar-fixed-top + .navbar-inner + .container + a.brand(href="/") Groonga CloudSearch + form.navbar-form.pull-right#domain + select(id="domain-and-id", name="domain-and-id") + p.navbar-text.pull-right Domain: + .container + .row + .span12 + form#search.form-search(onsubmit="searchExecute(); return false;") + input.search-query(type="text", name="query", value="") + input.btn(type="submit", value="Search") + input(type="hidden", name="start", value="") + + #request-information + #results + body - .navbar.navbar-fixed-top - .navbar-inner - .container - a.brand(href="/") Groonga CloudSearch - form.navbar-form.pull-right#domain - select(id="domain-and-id", name="domain-and-id") - p.navbar-text.pull-right Domain: - .container - .row - .span12 - != body -------------- next part -------------- HTML����������������������������... Download