.script("redback/permission.js").wait()
.script("redback/resource.js").wait()
.script("redback/roles.js").wait()
- .script("archiva/main.js");
+ .script("archiva/main.js").wait(function(){
+ //startArchivaApplication();
+ });
</script>
function(menu,topbar,message,modal,grids_generics,repositories) {
// template loading
- $.tmpl( menu, $.i18n.map ).appendTo("#html-fragments");
- $.tmpl( topbar, $.i18n.map ).appendTo("#html-fragments");
- $.tmpl( modal, $.i18n.map ).appendTo("#html-fragments");
+ $.tmpl( menu ).appendTo("#html-fragments");
+ $.tmpl( topbar ).appendTo("#html-fragments");
$("#html-fragments").append(message);
+ $.tmpl( modal ).appendTo("#html-fragments");
$("#html-fragments").append(grids_generics);
$("#html-fragments").append(repositories);
$.log("main-tmpl.js menu loaded");
}
});
- $('#topbar-menu-container').html($("#topbar-menu"));
- $('#sidebar-content').html($("#main-menu"));
-
-
- checkCreateAdminLink();
- hideElementWithKarma();
- checkSecurityLinks();
+ startArchivaApplication = function(){
+ $.log("startArchivaApplication");
+ $('#topbar-menu-container').html($("#topbar-menu"));
+ $('#sidebar-content').html($("#main-menu"));
+ checkCreateAdminLink();
+ hideElementWithKarma();
+ checkSecurityLinks();
+ }
+ startArchivaApplication();
})
});
</li>
<li id="logout-link" style="display: none">
<a href="#" onclick="logout();" id="logout-link-a">
- <span class="label important">${logout}</span>
+ <span class="label important">${$.i18n.prop('logout')}</span>
</a>
</li>
<li id="register-link" style="display: none">
loadAndParseFile = function (filename, settings) {
$.ajax({
url: filename,
- async: false,
+ async: true,
cache: settings.cache,
contentType:'text/plain;charset='+ settings.encoding,
dataType: 'text',
success: function(data, status) {
- parseData(data, settings.mode);
- }
+ parseData(data, settings.mode);
+ if(settings.callback){ settings.callback(); }
+ }
});
}
require(["text!redback/templates/user-edit.html", "text!redback/templates/user-grids.html", "text!redback/templates/login.html"
, "text!redback/templates/register-form.html","text!redback/templates/password-change-form.html"
,"text!redback/templates/user-edit-form.html","text!redback/templates/roles-tmpl.html"],
- function(usercreate, usergrids, login,register,passwordchange,useredit,roles_tmpl) {
+ function(useredit, usergrids, login,register,passwordchange,usereditform,roles) {
- $.tmpl( login, $.i18n.map ).appendTo("#html-fragments");
- $.tmpl( register, $.i18n.map ).appendTo("#html-fragments");
- $.tmpl( passwordchange, $.i18n.map ).appendTo("#html-fragments");
- $.tmpl( useredit, $.i18n.map ).appendTo("#html-fragments");
// template loading
- $("#html-fragments").append(usercreate);
+
+ $("#html-fragments").append(useredit);
+
$("#html-fragments").append(usergrids);
- $("#html-fragments").append(roles_tmpl);
+ $.tmpl(login).appendTo("#html-fragments");
+
+ $.tmpl(register).appendTo("#html-fragments");
+
+ $.tmpl(passwordchange).appendTo("#html-fragments");
+
+ $.tmpl(usereditform).appendTo("#html-fragments");
+
+ $("#html-fragments").append(roles);
+
+ $.log("redback-tmpl.js loaded");
}
);
\ No newline at end of file
<div id="modal-login-err-message" class="alert-message error" style="display:none"></div>
<fieldset>
<div class="clearfix">
- <label for="user-login-form-username">${username}</label>
+ <label for="user-login-form-username">${$.i18n.prop('username')}</label>
<div class="input">
<input type="text" id="user-login-form-username" name="user-login-form-username" class="required" />
</div>
</div>
<div class="clearfix">
- <label for="user-login-form-password">${password}</label>
+ <label for="user-login-form-password">${$.i18n.prop('password')}</label>
<div class="input">
<input type="password" id="user-login-form-password" name="user-login-form-password" class="required" />
</div>
</form>
</div>
<div class="modal-footer" id="modal-login-footer">
- <button class="btn primary" onclick="login();" id="modal-login-ok">${$.i18n.prop('login)}</button>
+ <button class="btn primary" onclick="return login();" id="modal-login-ok">${$.i18n.prop('login')}</button>
</div>
</div>
<div id="modal-register-err-message" class="alert-message error" style="display:none"></div>
<fieldset>
<div class="clearfix">
- <label for="user-register-form-username">${username}</label>
+ <label for="user-register-form-username">${$.i18n.prop('username')}</label>
<div class="input">
<input type="text" id="user-register-form-username" name="user-register-form-username" class="required" />
</div>
</div>
</div>
<div class="clearfix">
- <label for="user-register-form-email">${email}</label>
+ <label for="user-register-form-email">${$.i18n.prop('email')}</label>
<div class="input">
<input type="text" id="user-register-form-email" name="user-register-form-email" class="required email" />
</div>
<form id="user-create">
<fieldset id="user-create-fieldset">
<div class="clearfix">
- <label for="username">${i18n('username')}</label>
+ <label for="username">${$.i18n.prop('username')}</label>
<div class="input" id="username-div">
{{if $data.username.length>0}}
<span class="uneditable-input">${$data.username}</span>
</div>
</div>
<div class="clearfix">
- <label for="fullname">${i18n('full.name')}</label>
+ <label for="fullname">${$.i18n.prop('full.name')}</label>
<div class="input">
<input type="text" id="fullname" name="fullname" size="30" class="required" data-bind="value: fullName"/>
</div>
</div>
<div class="clearfix">
- <label for="password">${i18n('password')}</label>
+ <label for="password">${$.i18n.prop('password')}</label>
<div class="input">
<input type="password" id="password" name="password" class="required" data-bind="value: password"/>
</div>
</div>
<div class="clearfix">
- <label for="confirmPassword">${i18n('confirm.password')}</label>
+ <label for="confirmPassword">${$.i18n.prop('confirm.password')}</label>
<div class="input">
<input type="password" id="confirmPassword" name="confirmPassword" data-bind="value: confirmPassword"/>
</div>
</div>
<div class="clearfix">
- <label for="email">${i18n('email.address')}</label>
+ <label for="email">${$.i18n.prop('email.address')}</label>
<div class="input">
<input type="text" id="email" name="email" class="required email" data-bind="value: email"/>
</div>
</div>
<div class="clearfix">
- <label for="validated">${i18n('validated')}</label>
+ <label for="validated">${$.i18n.prop('validated')}</label>
<div class="input">
<input type="checkbox" id="validated" name="validated" data-bind="checked: validated"/>
</div>
</div>
<div class="clearfix">
- <label for="locked">${i18n('locked')}</label>
+ <label for="locked">${$.i18n.prop('locked')}</label>
<div class="input">
<input type="checkbox" id="locked" name="locked" data-bind="checked: locked"/>
</div>
</div>
<div class="clearfix">
- <label for="passwordChangeRequired">${i18n('passwordChangeRequired')}</label>
+ <label for="passwordChangeRequired">${$.i18n.prop('passwordChangeRequired')}</label>
<div class="input">
<input type="checkbox" id="passwordChangeRequired" name="passwordChangeRequired" data-bind="checked: passwordChangeRequired"/>
</div>
</div>
</fieldset>
- <button data-bind="click: save" class="btn" id="user-create-form-register-button">${i18n('save')}</button>
- <button class="btn" id="user-create-form-cancel-button">${i18n('cancel')}</button>
+ <button data-bind="click: save" class="btn" id="user-create-form-register-button">${$.i18n.prop('save')}</button>
+ <button class="btn" id="user-create-form-cancel-button">${$.i18n.prop('cancel')}</button>
</form>
</div>
<div class="span8 columns" id="user-edit-roles">
~~ NOTE: For help with the syntax of this file, see:
~~ http://maven.apache.org/guides/mini/guide-apt-format.html
-Generics Javascript functions
\ No newline at end of file
+Generics Javascript
\ No newline at end of file
<item name="JS Template loading" href="/template-loading.html"/>
<item name="i18n" href="/i18n.html"/>
<item name="Knockout Binding" href="/knockout-binding.html"/>
- <item name="Generic Javascipts" href="/generics-js"/>
+ <item name="Generic Javascipts" href="/generics-js.html"/>
</menu>
</body>
<script type="text/javascript" src="js/fancy-box-activation.js"></script>
<script src="js/jquery.fancybox-1.3.4.pack.js" type="text/javascript"></script>
<link rel="stylesheet" href="css/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
+
+ <macro name="toc"/>
+
<section name="Archiva Javascript Web Application">
<subsection name="General design">
<p>
</ul>
</p>
</subsection>
+ <subsection name="Sources organisation">
+ <p>
+ Sources are located in src/main/webapp :
+ <ul>
+ <li>css</li>
+ <li>images</li>
+ <li>js</li>
+ </ul>
+ </p>
+ <subsection name="js directory">
+ <p>
+ Root directory contains external libraries.
+ </p>
+ <p>
+ archiva directory contains archiva js files with a subdirectory templates which contains templates
+ </p>
+ <p>
+ redback directory contains redback js files with a subdirectory templates which contains templates
+ </p>
+ </subsection>
+ </subsection>
+
<subsection name="Start page">
<p>
The main page will load javascript files, load <a href="./i18n.html">i18n</a>, <a href="./template-loading.html">load templates</a> and insert menu.
</p>
</p>
</subsection>
- <subsection name="Sources organisation">
- <p>
- Sources are located in src/main/webapp :
- <ul>
- <li>css</li>
- <li>images</li>
- <li>js</li>
- </ul>
- </p>
- <subsection name="js directory">
- <p>
- Root directory contains external libraries.
- </p>
- <p>
- archiva directory contains archiva js files with a subdirectory templates which contains templates
- </p>
- <p>
- redback directory contains redback js files with a subdirectory templates which contains templates
- </p>
- </subsection>
- </subsection>
+
</section>
</body>
</document>