Upgrade to Bootstrap 3

This commit is contained in:
benweet 2013-08-26 12:32:20 +01:00
parent fec26ea3d6
commit 173f48ff21
13 changed files with 150 additions and 117 deletions

View File

@ -87,28 +87,28 @@ lib/MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SuppMathOperators.js
#dynamic
# Sun 25 Aug 2013 23:22:57 CEST
js-min/font/fontello.eot
js-min/font/fontello.svg
js-min/font/fontello.ttf
js-min/font/fontello.woff
js-min/img/glyphicons-halflings-white.png
js-min/img/glyphicons-halflings.png
js-min/img/icons.png
js-min/img/icons2x.png
js-min/img/loader-blue-gray.gif
js-min/img/loader-blue-gray2x.gif
js-min/img/loader-default.gif
js-min/img/loader-default2x.gif
js-min/img/loader-night.gif
js-min/img/loader-night2x.gif
js-min/img/stackedit-32.ico
js-min/img/stackedit-64.png
js-min/img/stackedit-promo.png
js-min/main.js
js-min/themes/blue-gray.css
js-min/themes/default.css
js-min/themes/night.css
# Mon 26 Aug 2013 12:32:03 WEST
res-min/font/fontello.eot
res-min/font/fontello.svg
res-min/font/fontello.ttf
res-min/font/fontello.woff
res-min/img/glyphicons-halflings-white.png
res-min/img/glyphicons-halflings.png
res-min/img/icons.png
res-min/img/icons2x.png
res-min/img/loader-blue-gray.gif
res-min/img/loader-blue-gray2x.gif
res-min/img/loader-default.gif
res-min/img/loader-default2x.gif
res-min/img/loader-night.gif
res-min/img/loader-night2x.gif
res-min/img/stackedit-32.ico
res-min/img/stackedit-64.png
res-min/img/stackedit-promo.png
res-min/main.js
res-min/themes/blue-gray.css
res-min/themes/default.css
res-min/themes/night.css
NETWORK:
*

View File

@ -24,7 +24,7 @@
]
};
</script>
<script src="js/libs/require.js"></script>
<script src="res/libs/require.js"></script>
</head>
<body>

File diff suppressed because one or more lines are too long

View File

@ -1304,7 +1304,7 @@ th.visible-print,td.visible-print{display:none !important}
.working{cursor:progress}
.btn,.dropdown-menu{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}
.list-group .nav{border-left:10px solid rgba(0,0,0,0.05);margin-left:10px}
.list-group-item{padding:10px 15px;margin:0}
.list-group-item{padding:10px 15px}
.list-group .list-group-item{border-radius:0}
.list-group-item.active:hover{background-color:#888}
.move-to-front{z-index:1050 !important}

View File

@ -1304,7 +1304,7 @@ th.visible-print,td.visible-print{display:none !important}
.working{cursor:progress}
.btn,.dropdown-menu{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}
.list-group .nav{border-left:10px solid rgba(0,0,0,0.05);margin-left:10px}
.list-group-item{padding:10px 15px;margin:0}
.list-group-item{padding:10px 15px}
.list-group .list-group-item{border-radius:0}
.list-group-item.active:hover{background-color:#888}
.move-to-front{z-index:1050 !important}

View File

@ -1304,7 +1304,7 @@ th.visible-print,td.visible-print{display:none !important}
.working{cursor:progress}
.btn,.dropdown-menu{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}
.list-group .nav{border-left:10px solid rgba(255,255,255,0.08);margin-left:10px}
.list-group-item{padding:10px 15px;margin:0}
.list-group-item{padding:10px 15px}
.list-group .list-group-item{border-radius:0}
.list-group-item.active:hover{background-color:#444}
.move-to-front{z-index:1050 !important}

View File

@ -105,6 +105,8 @@ define([
// Delete folders
_.each(selectedFolderList, function(folderDesc) {
utils.removeIndexFromArray("folder.list", folderDesc.folderIndex);
localStorage.removeItem(folderDesc.folderIndex + ".name");
localStorage.removeItem(folderDesc.folderIndex + ".files");
delete folderList[folderDesc.folderIndex];
});
eventMgr.onFoldersChanged();

View File

@ -48,8 +48,8 @@
<div class="menu-panel collapse width">
<button class="btn btn-success collapse-button" data-toggle="collapse"
data-target=".menu-panel" title="Menu">
<i class="icon-left-dir"></i> <img data-stackedit-src="stackedit-64.png"
width="32" height="32" />
<i class="icon-left-dir"></i> <img
data-stackedit-src="stackedit-64.png" width="32" height="32" />
</button>
<div class="panel-content">
<div class="list-group">
@ -412,8 +412,10 @@
</div>
<div class="modal-body">
<p>
This will save "<span class="file-title"></span>" to your Google
Drive account and keep it synchronized.
This will save "<span class="file-title"></span>" to your <i
class="icon-provider-gdrive"></i>
<code>Google Drive</code>
account and keep it synchronized.
</p>
<div class="form-horizontal">
<div class="form-group">
@ -426,7 +428,8 @@
placeholder="FolderID" class="form-control">
<div class="input-group-btn">
<a class="btn btn-link export-gdrive-choose-folder"
title="Choose folder" data-dismiss="modal"><i class="icon-folder-open"></i></a>
title="Choose folder" data-dismiss="modal"><i
class="icon-folder-open"></i></a>
</div>
</div>
<span class="help-block"> If no folder ID is supplied, the
@ -487,7 +490,9 @@
</div>
<div class="modal-body">
<p>
This will save "<span class="file-title"></span>" to your Dropbox
This will save "<span class="file-title"></span>" to your <i
class="icon-provider-dropbox"></i>
<code>Dropbox</code>
account and keep it synchronized.
</p>
<div class="form-horizontal">
@ -545,7 +550,9 @@
"<span class="file-title"></span>" is not synchronized yet. <br />
<br /> <b>NOTE:</b> You can add synchronized locations by
exporting your document using <i class="icon-provider-gdrive"></i>
Google Drive or <i class="icon-provider-dropbox"></i> Dropbox
<code>Google Drive</code>
or <i class="icon-provider-dropbox"></i>
<code>Dropbox</code>
sub-menu.
</blockquote>
</div>

View File

@ -131,5 +131,18 @@ define([
version = "v7";
}
// Upgrade from v7 to v8
if(version == "v7") {
_.each(_.keys(localStorage), function(key) {
var matchResult = key.match(/(file\.\S+\.)\S+/);
if(matchResult) {
if(!_.has(localStorage, matchResult[1] + 'title')) {
localStorage.removeItem(key);
}
}
});
version = "v8";
}
localStorage["version"] = version;
});

View File

@ -75,7 +75,7 @@
@tooltip-max-width: 220px;
@close-color: @primary-color;
// Copied from Bootstrap
// Copied from Bootstrap in order to have correct urls
.img-retina(@file-1x; @file-2x; @width-1x; @height-1x) {
background-image: url("@{file-1x}");
@ -123,7 +123,6 @@ body {
.list-group-item {
padding: 10px 15px;
margin: 0;
.list-group & {
border-radius: 0;
}

View File

@ -1,9 +1,9 @@
// RequireJS optimizer configuration file
({
baseUrl: "../js",
baseUrl: "../res",
name: "main",
out: "../js-min/main.js",
mainConfigFile: '../js/main.js',
out: "../res-min/main.js",
mainConfigFile: '../res/main.js',
optimize: "uglify2",
uglify2: {
output: {

View File

@ -1,25 +1,29 @@
#!/bin/sh
echo
echo '### Installing dependencies ###'
npm install requirejs
npm install less
export PATH=${PATH}:`pwd`/node_modules/requirejs/bin/:`pwd`/node_modules/less/bin/
echo
echo '### Optimizing JavaScript ###'
rm -rf js-min
rm -rf res-min
r.js -o tools/optimize-js.json
echo
echo '### Optimizing CSS ###'
mkdir -p js-min/themes
cd js/themes
for theme in *; do lessc $theme | sed 's/@import/@import (less)/g' | lessc -x - > `echo ../../js-min/themes/${theme} | sed 's/.less$/.css/'`; done
mkdir -p res-min/themes
cd res/themes
for theme in *; do lessc $theme | sed 's/@import/@import (less)/g' | lessc -x - > `echo ../../res-min/themes/${theme} | sed 's/.less$/.css/'`; done
cd ../..
cp -R js/libs/fontello/font js-min/
cp -R js/img js-min/
cp -R res/libs/fontello/font res-min/
cp -R res/img res-min/
echo
echo '### Updating cache.manifest ###'
sed -n '1,/#dynamic/p' cache.manifest > cache.manifest.new
printf "\n# `date`\n" >> cache.manifest.new
find js-min -type f >> cache.manifest.new
find res-min -type f >> cache.manifest.new
printf "\nNETWORK:\n*" >> cache.manifest.new
mv cache.manifest.new cache.manifest

View File

@ -25,7 +25,7 @@
]
};
</script>
<script src="js/libs/require.js"></script>
<script src="res/libs/require.js"></script>
</head>
<body class="viewer">
</body>