mirror of https://github.com/xwiki-labs/cryptpad
Create a settings app to manage user objects
This commit is contained in:
parent
71b84afdb2
commit
cd9cea8fa4
|
@ -10,7 +10,9 @@
|
|||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
<script src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
|
@ -22,7 +24,7 @@
|
|||
<div id="cryptpadTopBar">
|
||||
<span>
|
||||
<a class="gotoMain" href="/">
|
||||
<img src="customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
<img src="/customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
<script src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
|
@ -22,7 +24,7 @@
|
|||
<div id="cryptpadTopBar">
|
||||
<span>
|
||||
<a class="gotoMain" href="/">
|
||||
<img src="customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
<img src="/customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -113,6 +113,14 @@ define([
|
|||
return storeObj.login_name;
|
||||
};
|
||||
|
||||
ret.repairDrive = function () {
|
||||
filesOp.fixFiles();
|
||||
};
|
||||
|
||||
ret.getEmptyObject = function () {
|
||||
return filesOp.getStructure();
|
||||
};
|
||||
|
||||
var changeHandlers = ret.changeHandlers = [];
|
||||
|
||||
ret.change = function (f) {};
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
<script src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
|
@ -22,7 +24,7 @@
|
|||
<div id="cryptpadTopBar">
|
||||
<span>
|
||||
<a class="gotoMain" href="/">
|
||||
<img src="customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
<img src="/customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
@ -76,14 +78,8 @@
|
|||
</div>
|
||||
|
||||
<div id="userForm" class="form-group hidden">
|
||||
|
||||
|
||||
<input type="text" id="name" name="name" class="form-control"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-localization-placeholder="login_username" autofocus>
|
||||
<input type="password" id="password" name="password" class="form-control"
|
||||
autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"
|
||||
data-localization-placeholder="login_password">
|
||||
<input type="text" id="name" name="name" class="form-control" data-localization-placeholder="login_username" autofocus>
|
||||
<input type="password" id="password" name="password" class="form-control" data-localization-placeholder="login_password">
|
||||
<div style="display: none;"><span class="remember form-check"><label for="rememberme" class="form-check-label" data-localization-append="login_remember"><input type="checkbox" id="rememberme" class="form-check-input" checked="checked"></label></span><br></div>
|
||||
<button class="btn btn-secondary login half first" data-localization="login_login"></button> <button class="btn btn-success register half" data-localization="login_register"></button>
|
||||
<p class="separator" data-localization="login_orNoLogin"></p>
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
<script src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
|
@ -22,7 +24,7 @@
|
|||
<div id="cryptpadTopBar">
|
||||
<span>
|
||||
<a class="gotoMain" href="/">
|
||||
<img src="customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
<img src="/customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -31,7 +31,10 @@ var fragments = {};
|
|||
'contact',
|
||||
'logo',
|
||||
'noscript',
|
||||
'footer'
|
||||
'footer',
|
||||
'empty',
|
||||
'script',
|
||||
'appscript'
|
||||
].forEach(function (name) {
|
||||
fragments[name] = read('./fragments/' + name + '.html');
|
||||
});
|
||||
|
@ -41,7 +44,7 @@ var fragments = {};
|
|||
var source = swap(template, {
|
||||
topbar: fragments.topbar,
|
||||
fork: fragments.fork,
|
||||
main: swap(fragments[page], {
|
||||
main: swap(fragments[page] || fragments.empty, {
|
||||
topbar: fragments.topbar,
|
||||
fork: fragments.fork,
|
||||
logo: fragments.logo,
|
||||
|
@ -51,6 +54,29 @@ var fragments = {};
|
|||
logo: fragments.logo,
|
||||
noscript: fragments.noscript,
|
||||
footer: fragments.footer,
|
||||
script: fragments.script
|
||||
});
|
||||
write('../' + page + '.html', source);
|
||||
});
|
||||
|
||||
// build static pages
|
||||
['../www/settings/index'].forEach(function (page) {
|
||||
var source = swap(template, {
|
||||
topbar: fragments.topbar,
|
||||
fork: fragments.fork,
|
||||
main: swap(fragments[page] || fragments.empty, {
|
||||
topbar: fragments.topbar,
|
||||
fork: fragments.fork,
|
||||
logo: fragments.logo,
|
||||
noscript: fragments.noscript,
|
||||
footer: fragments.footer,
|
||||
}),
|
||||
logo: fragments.logo,
|
||||
noscript: fragments.noscript,
|
||||
footer: fragments.footer,
|
||||
script: fragments.appscript
|
||||
});
|
||||
write('../' + page + '.html', source);
|
||||
});
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<div id="cryptpadTopBar">
|
||||
<span>
|
||||
<a class="gotoMain" href="/">
|
||||
<img src="customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
<img src="/customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
{{script}}
|
||||
<script src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
|
|
|
@ -10,7 +10,9 @@
|
|||
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
|
||||
<script src="/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
|
||||
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-main="/customize/main" src="/bower_components/requirejs/require.js"></script>
|
||||
|
||||
|
||||
<script src="/bower_components/requirejs/require.js"></script>
|
||||
<script>
|
||||
require.config({
|
||||
|
@ -22,7 +24,7 @@
|
|||
<div id="cryptpadTopBar">
|
||||
<span>
|
||||
<a class="gotoMain" href="/">
|
||||
<img src="customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
<img src="/customize/cryptofist_mini.png" class="cryptpad-logo" alt="" /> CryptPad
|
||||
</a>
|
||||
</span>
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"scripts": {
|
||||
"lint": "jshint --config .jshintrc --exclude-path .jshintignore .",
|
||||
"test": "node TestSelenium.js",
|
||||
"style": "lessc ./customize.dist/src/less/cryptpad.less > ./customize.dist/main.css && lessc ./customize.dist/src/less/toolbar.less > ./customize.dist/toolbar.css && lessc ./www/drive/file.less > ./www/drive/file.css",
|
||||
"style": "lessc ./customize.dist/src/less/cryptpad.less > ./customize.dist/main.css && lessc ./customize.dist/src/less/toolbar.less > ./customize.dist/toolbar.css && lessc ./www/drive/file.less > ./www/drive/file.css && lessc ./www/settings/main.less > ./www/settings/main.css",
|
||||
"template": "cd customize.dist/src && node build.js"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,16 @@ define([
|
|||
console.error.apply(console, arguments);
|
||||
};
|
||||
|
||||
var getStructure = exp.getStructure = function () {
|
||||
var a = {};
|
||||
a[ROOT] = {};
|
||||
a[UNSORTED] = [];
|
||||
a[TRASH] = {};
|
||||
a[FILES_DATA] = [];
|
||||
a[TEMPLATE] = [];
|
||||
return a;
|
||||
};
|
||||
|
||||
var comparePath = exp.comparePath = function (a, b) {
|
||||
if (!a || !b || !$.isArray(a) || !$.isArray(b)) { return false; }
|
||||
if (a.length !== b.length) { return false; }
|
||||
|
|
Loading…
Reference in New Issue