Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Templates #16

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .tmp/scripts/templates/active-server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
define(function(){
var template = function(__obj) {
var _safe = function(value) {
if (typeof value === 'undefined' && value == null)
value = '';
var result = new String(value);
result.ecoSafe = true;
return result;
};
return (function() {
var __out = [], __self = this, _print = function(value) {
if (typeof value !== 'undefined' && value != null)
__out.push(value.ecoSafe ? value : __self.escape(value));
}, _capture = function(callback) {
var out = __out, result;
__out = [];
callback.call(this);
result = __out.join('');
__out = out;
return _safe(result);
};
(function() {
var i, len, ref, server;

_print(_safe('<label for="activeServer">'));

_print(this.label);

_print(_safe('</label>\n<select name="activeServer" class="activeServer">\n <option value="null">--</option>\n '));

ref = this.servers;
for (i = 0, len = ref.length; i < len; i++) {
server = ref[i];
_print(_safe('\n '));
if (server.id === this.activeServerId) {
_print(_safe('\n <option value="'));
_print(server.id);
_print(_safe('" selected >'));
_print(server.name);
_print(_safe('</option>\n '));
} else {
_print(_safe('\n <option value="'));
_print(server.id);
_print(_safe('">'));
_print(server.name);
_print(_safe('</option>\n '));
}
_print(_safe('\n '));
}

_print(_safe('\n</select>\n\n'));

}).call(this);

return __out.join('');
}).call((function() {
var obj = {
escape: function(value) {
return ('' + value)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
},
safe: _safe
}, key;
for (key in __obj) obj[key] = __obj[key];
return obj;
})());
};
return template;
});
44 changes: 44 additions & 0 deletions .tmp/scripts/templates/add-user.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
define(function(){
var template = function(__obj) {
var _safe = function(value) {
if (typeof value === 'undefined' && value == null)
value = '';
var result = new String(value);
result.ecoSafe = true;
return result;
};
return (function() {
var __out = [], __self = this, _print = function(value) {
if (typeof value !== 'undefined' && value != null)
__out.push(value.ecoSafe ? value : __self.escape(value));
}, _capture = function(callback) {
var out = __out, result;
__out = [];
callback.call(this);
result = __out.join('');
__out = out;
return _safe(result);
};
(function() {
_print(_safe(' <div class="dative-widget-header ui-widget-header ui-corner-top">\n\n <div class=\'dative-widget-header-title\'>Grant a user access to this\n corpus</div>\n\n </div>\n\n <div class="dative-widget-body">\n\n <ul class="fieldset">\n\n <li>\n <label for=\'role\'>Role</label>\n <select name=\'role\'>\n <option value=\'reader\'>Reader</option>\n <option value=\'writer\'>Writer</option>\n <option value=\'admin\'>Admin</option>\n </select>\n <div class=\'dative-add-user-failed-container\'>\n <span class=\'ui-state-error ui-corner-all dative-add-user-failed\n role-error\'></span>\n </div>\n </li>\n\n <li>\n <label for=\'username\'>Username</label>\n <input type=\'text\' name=\'username\' class=\'dative-tooltip ui-corner-all\'\n title=\'enter the username of an existing user; the form will autocomplete\n with the usernames of existing users\' />\n <div class=\'dative-add-user-failed-container\'>\n <span class=\'ui-state-error ui-corner-all dative-add-user-failed\n username-error\'></span>\n </div>\n </li>\n\n <li>\n <label for=\'username\'></label>\n <button class=\'request-add-user dative-tooltip\'\n title=\'request that this user be added to this corpus with the specified role\'\n >Add User</button>\n </li>\n\n </ul>\n\n </div>\n\n'));

}).call(this);

return __out.join('');
}).call((function() {
var obj = {
escape: function(value) {
return ('' + value)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
},
safe: _safe
}, key;
for (key in __obj) obj[key] = __obj[key];
return obj;
})());
};
return template;
});
44 changes: 44 additions & 0 deletions .tmp/scripts/templates/alert-dialog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
define(function(){
var template = function(__obj) {
var _safe = function(value) {
if (typeof value === 'undefined' && value == null)
value = '';
var result = new String(value);
result.ecoSafe = true;
return result;
};
return (function() {
var __out = [], __self = this, _print = function(value) {
if (typeof value !== 'undefined' && value != null)
__out.push(value.ecoSafe ? value : __self.escape(value));
}, _capture = function(callback) {
var out = __out, result;
__out = [];
callback.call(this);
result = __out.join('');
__out = out;
return _safe(result);
};
(function() {
_print(_safe('<div class=\'dative-alert-dialog\'>\n\n <div class=\'dative-alert-text\'>\n Hello from the alert dialog!\n </div>\n\n <textarea class=\'dative-alert-prompt\'></textarea>\n\n</div>\n\n<div class=\'dative-alert-dialog-target\'><div>\n\n'));

}).call(this);

return __out.join('');
}).call((function() {
var obj = {
escape: function(value) {
return ('' + value)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
},
safe: _safe
}, key;
for (key in __obj) obj[key] = __obj[key];
return obj;
})());
};
return template;
});
44 changes: 44 additions & 0 deletions .tmp/scripts/templates/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
define(function(){
var template = function(__obj) {
var _safe = function(value) {
if (typeof value === 'undefined' && value == null)
value = '';
var result = new String(value);
result.ecoSafe = true;
return result;
};
return (function() {
var __out = [], __self = this, _print = function(value) {
if (typeof value !== 'undefined' && value != null)
__out.push(value.ecoSafe ? value : __self.escape(value));
}, _capture = function(callback) {
var out = __out, result;
__out = [];
callback.call(this);
result = __out.join('');
__out = out;
return _safe(result);
};
(function() {
_print(_safe('<div id=\'mainmenu\'></div>\n<div id=\'progress-widget-container\'></div>\n<div id=\'notifier-container\'></div>\n<div id=\'appview\' class=\'ui-widget ui-widget-content ui-corner-all\'></div>\n<div id=\'login-dialog-container\'></div>\n<div id=\'register-dialog-container\'></div>\n<div id=\'alert-dialog-container\'></div>\n<div id=\'tasks-dialog-container\'></div>\n<div id=\'help-dialog-container\'></div>\n<div id=\'exporter-dialog-container\'></div>\n<div id=\'importer-dialog-container\'></div>\n<div id=\'resources-dialog-container\'></div>\n<div id=\'resource-displayer-dialog-container-1\'></div>\n<div id=\'resource-displayer-dialog-container-2\'></div>\n<div id=\'resource-displayer-dialog-container-3\'></div>\n<div id=\'resource-displayer-dialog-container-4\'></div>\n\n'));

}).call(this);

return __out.join('');
}).call((function() {
var obj = {
escape: function(value) {
return ('' + value)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
},
safe: _safe
}, key;
for (key in __obj) obj[key] = __obj[key];
return obj;
})());
};
return template;
});
119 changes: 119 additions & 0 deletions .tmp/scripts/templates/application-settings-edit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
define(function(){
var template = function(__obj) {
var _safe = function(value) {
if (typeof value === 'undefined' && value == null)
value = '';
var result = new String(value);
result.ecoSafe = true;
return result;
};
return (function() {
var __out = [], __self = this, _print = function(value) {
if (typeof value !== 'undefined' && value != null)
__out.push(value.ecoSafe ? value : __self.escape(value));
}, _capture = function(callback) {
var out = __out, result;
__out = [];
callback.call(this);
result = __out.join('');
__out = out;
return _safe(result);
};
(function() {
var activeServer, corpus, i, j, k, len, len1, len2, ref, ref1, ref2, s, server;

_print(_safe('<form id="applicationSettingsForm" action="" method="" class="applicationSettingsForm">\n <ul class="fieldset">\n\n '));

activeServer = ((function() {
var i, len, ref, results;
ref = this.servers;
results = [];
for (i = 0, len = ref.length; i < len; i++) {
s = ref[i];
if (s.url === this.activeServer) {
results.push(s);
}
}
return results;
}).call(this))[0];

_print(_safe('\n\n <li class="serverSelect">\n <label for="activeServer">Active Server *</label>\n <select name="activeServer" class="activeServer">\n '));

if (!this.servers.length) {
_print(_safe('\n <option value="noServer">configure a server in Application\n Settings</option>\n '));
} else {
_print(_safe('\n '));
ref = this.servers;
for (i = 0, len = ref.length; i < len; i++) {
server = ref[i];
_print(_safe('\n <option value="'));
_print(server.url);
_print(_safe('">'));
_print(server.name);
_print(_safe('</option>\n '));
}
_print(_safe('\n '));
}

_print(_safe('\n </select>\n </li>\n\n <li class="corpusSelect">\n <label for="corpus">Corpus</label>\n <select name="corpus" class="corpus">\n '));

if (!activeServer.corpora.length) {
_print(_safe('\n <option value="noCorpus">login to access corpus list</option>\n '));
} else {
_print(_safe('\n '));
ref1 = activeServer.corpora;
for (j = 0, len1 = ref1.length; j < len1; j++) {
corpus = ref1[j];
_print(_safe('\n <option value="'));
_print(corpus);
_print(_safe('">'));
_print(corpus);
_print(_safe('</option>\n '));
}
_print(_safe('\n '));
}

_print(_safe('\n </select>\n </li>\n\n <!--\n <li>\n <label for="loggedIn">Logged in</label>\n <div class="dative-display">'));

_print(this.loggedIn);

_print(_safe('</div>\n </li>\n\n <li>\n <label for="username">Username</label>\n <div class="dative-display">'));

_print(this.username);

_print(_safe('</div>\n </li>\n -->\n\n </ul>\n\n <div class="dative-widget-center server-config-widget ui-widget\n ui-widget-content ui-corner-all">\n\n <div class="ui-widget-header ui-corner-top dative-widget-header">\n\n <div class=\'dative-widget-header-title\'>Servers</div>\n\n <button class="float-left toggle-appear"></button>\n <button class="float-left add-server" title="new server"></button>\n <button class="float-left save-server" title="save server"></button>\n\n </div>\n\n <div class="buffer" style="height:10px;"></div>\n\n <div class="server-config-widget-body dative-widget-body">\n\n <ul class="fieldset">\n\n <li>\n '));

ref2 = this.servers;
for (k = 0, len2 = ref2.length; k < len2; k++) {
server = ref2[k];
_print(_safe('\n <ul class="fieldset">\n <li>\n <label for="name">Name</label>\n <input type="text" name="name" class="dative-input\n dative-input-display" value="'));
_print(server.name);
_print(_safe('" />\n </li>\n <li>\n <label for="url">URL</label>\n <input type="text" name="url" class="dative-input\n dative-input-display" value="'));
_print(server.url);
_print(_safe('" />\n </li>\n <li>\n <label for="type">Type</label>\n <input type="text" name="type" class="dative-input\n dative-input-display" value="'));
_print(server.type);
_print(_safe('" />\n </li>\n </ul>\n '));
}

_print(_safe('\n </li>\n </ul>\n </div>\n </div>\n\n</form>\n\n'));

}).call(this);

return __out.join('');
}).call((function() {
var obj = {
escape: function(value) {
return ('' + value)
.replace(/&/g, '&amp;')
.replace(/</g, '&lt;')
.replace(/>/g, '&gt;')
.replace(/"/g, '&quot;');
},
safe: _safe
}, key;
for (key in __obj) obj[key] = __obj[key];
return obj;
})());
};
return template;
});
Loading