Dynamic JS loading and UI updates
parent
2311cdf1f2
commit
48941f1713
|
@ -1,4 +1,4 @@
|
|||
<%@attribute name="loadapp" required="false" type="java.lang.Boolean" %>
|
||||
<%@attribute name="js" required="false" %>
|
||||
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!-- Le javascript
|
||||
|
@ -8,8 +8,8 @@
|
|||
<script type="text/javascript" src="resources/js/underscore-min.js"></script>
|
||||
<script type="text/javascript" src="resources/js/backbone-min.js"></script>
|
||||
<script type="text/javascript" src="resources/js/backbone.validations.js"></script>
|
||||
<c:if test="${loadapp == null || loadapp == Boolean.TRUE}">
|
||||
<script type="text/javascript" src="resources/js/app.js"></script>
|
||||
<c:if test="${js != null || js != ''}">
|
||||
<script type="text/javascript" src="${js}"></script>
|
||||
</c:if>
|
||||
</body>
|
||||
</html>
|
|
@ -10,13 +10,15 @@
|
|||
<div class="row-fluid">
|
||||
<o:sidebar/>
|
||||
<div class="span10">
|
||||
<div class="content">
|
||||
<div class="content span12">
|
||||
<o:breadcrumbs crumb="Manage Clients"/>
|
||||
|
||||
<div class="progress">
|
||||
<div class="bar" style="width: 60%;"></div>
|
||||
</div>
|
||||
<span id="content"></span>
|
||||
<o:copyright/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<o:footer/>
|
||||
<o:footer js="resources/js/admin.js"/>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
@import url('https://fonts.googleapis.com/css?family=Open+Sans:400,700');
|
||||
|
||||
html {overflow-y: scroll;}
|
||||
article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
|
||||
audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
|
||||
audio:not([controls]){display:none;}
|
||||
|
@ -176,7 +178,7 @@ input:focus:required:invalid,textarea:focus:required:invalid,select:focus:requir
|
|||
.form-actions{padding:17px 20px 18px;margin-top:18px;margin-bottom:18px;background-color:#eeeeee;border-top:1px solid #ddd;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";}
|
||||
.form-actions:after{clear:both;}
|
||||
.uneditable-input{overflow:hidden;white-space:nowrap;cursor:not-allowed;background-color:#ffffff;border-color:#eee;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);}
|
||||
:-moz-placeholder{color:#999999;}
|
||||
:-moz-placeholder{color:#d7d7d7;}
|
||||
::-webkit-input-placeholder{color:#999999;}
|
||||
.help-block,.help-inline{color:#888888;}
|
||||
.help-block{display:block;margin-bottom:9px;}
|
||||
|
|
|
@ -554,7 +554,8 @@
|
|||
"clients":"listClients",
|
||||
"client/new":"newClient",
|
||||
"client/:id":"editClient",
|
||||
"white_list":"whiteList"
|
||||
"white_list":"whiteList",
|
||||
'*path': 'listClients'
|
||||
},
|
||||
|
||||
initialize:function () {
|
||||
|
@ -667,8 +668,7 @@
|
|||
};
|
||||
|
||||
// load templates and append them to the body
|
||||
$.get('resources/template/client.html', _load);
|
||||
$.get('resources/template/list.html', _load);
|
||||
$.get('resources/template/admin.html', _load);
|
||||
|
||||
jQuery.ajaxSetup({async:true});
|
||||
app = new AppRouter();
|
|
@ -1,10 +0,0 @@
|
|||
<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>
|
Loading…
Reference in New Issue