diff --git a/bin/checkPad.js b/bin/checkPad.js index a72f0060a..a46c18140 100644 --- a/bin/checkPad.js +++ b/bin/checkPad.js @@ -4,17 +4,17 @@ if(process.argv.length != 3) { - console.error("Use: node checkPad.js $PADID"); + console.error("Use: node bin/checkPad.js $PADID"); process.exit(1); } //get the padID var padId = process.argv[2]; //initalize the database -var log4js = require("log4js"); +var log4js = require("../src/node_modules/log4js"); log4js.setGlobalLogLevel("INFO"); -var async = require("async"); -var db = require('../node/db/DB'); +var async = require("../src/node_modules/async"); +var db = require('../src/node/db/DB'); var Changeset = require("ep_etherpad-lite/static/js/Changeset"); var padManager; @@ -28,7 +28,7 @@ async.series([ //get the pad function (callback) { - padManager = require('../node/db/PadManager'); + padManager = require('../src/node/db/PadManager'); padManager.doesPadExists(padId, function(err, exists) { diff --git a/src/node/db/API.js b/src/node/db/API.js index 09cc95afc..37fd3f161 100644 --- a/src/node/db/API.js +++ b/src/node/db/API.js @@ -431,7 +431,7 @@ exports.setPassword = function(padID, password, callback) if(ERR(err, callback)) return; //set the password - pad.setPassword(password); + pad.setPassword(password == "" ? null : password); callback(); }); diff --git a/src/node/handler/APIHandler.js b/src/node/handler/APIHandler.js index d4d7d6ce4..98b1ed165 100644 --- a/src/node/handler/APIHandler.js +++ b/src/node/handler/APIHandler.js @@ -29,12 +29,12 @@ var randomString = require('ep_etherpad-lite/static/js/pad_utils').randomString; var apikey = null; try { - apikey = fs.readFileSync("../APIKEY.txt","utf8"); + apikey = fs.readFileSync("./APIKEY.txt","utf8"); } catch(e) { apikey = randomString(32); - fs.writeFileSync("../APIKEY.txt",apikey,"utf8"); + fs.writeFileSync("./APIKEY.txt",apikey,"utf8"); } //a list of all functions diff --git a/src/node/handler/ImportHandler.js b/src/node/handler/ImportHandler.js index ed5eb05ee..788706ce7 100644 --- a/src/node/handler/ImportHandler.js +++ b/src/node/handler/ImportHandler.js @@ -196,6 +196,6 @@ exports.doImport = function(req, res, padId) ERR(err); //close the connection - res.send("", 200); + res.send("", 200); }); } diff --git a/src/node/server.js b/src/node/server.js old mode 100644 new mode 100755 index 9d2c52e44..4eb38ea7a --- a/src/node/server.js +++ b/src/node/server.js @@ -1,3 +1,4 @@ +#!/usr/bin/env node /** * This module is started with bin/run.sh. It sets up a Express HTTP and a Socket.IO Server. * Static file Requests are answered directly from this module, Socket.IO messages are passed @@ -65,9 +66,9 @@ async.waterfall([ plugins.update, function (callback) { - console.log("Installed plugins: " + plugins.formatPlugins()); - console.log("Installed parts:\n" + plugins.formatParts()); - console.log("Installed hooks:\n" + plugins.formatHooks()); + console.info("Installed plugins: " + plugins.formatPlugins()); + console.debug("Installed parts:\n" + plugins.formatParts()); + console.debug("Installed hooks:\n" + plugins.formatHooks()); callback(); }, @@ -88,12 +89,12 @@ async.waterfall([ //let the server listen app.listen(settings.port, settings.ip); - console.log("Server is listening at " + settings.ip + ":" + settings.port); + console.log("You can access your Etherpad-Lite instance at http://" + settings.ip + ":" + settings.port + "/"); if(!_.isEmpty(settings.users)){ - console.log("Plugin admin page listening at " + settings.ip + ":" + settings.port + "/admin/plugins"); + console.log("The plugin admin page is at http://" + settings.ip + ":" + settings.port + "/admin/plugins"); } else{ - console.log("Admin username and password not set in settings.json. To access admin please uncomment and edit 'users' in settings.json"); + console.warn("Admin username and password not set in settings.json. To access admin please uncomment and edit 'users' in settings.json"); } callback(null); } diff --git a/src/node/utils/Minify.js.rej b/src/node/utils/Minify.js.rej deleted file mode 100644 index f09f49dc7..000000000 --- a/src/node/utils/Minify.js.rej +++ /dev/null @@ -1,513 +0,0 @@ -/** - * This Module manages all /minified/* requests. It controls the - * minification && compression of Javascript and CSS. - */ - -/* - * 2011 Peter 'Pita' Martischka (Primary Technology Ltd) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -var ERR = require("async-stacktrace"); -var settings = require('./Settings'); -var async = require('async'); -var fs = require('fs'); -var cleanCSS = require('clean-css'); -var jsp = require("uglify-js").parser; -var pro = require("uglify-js").uglify; -var path = require('path'); -var RequireKernel = require('require-kernel'); -var server = require('../server'); - -<<<<<<< HEAD -var ROOT_DIR = path.normalize(__dirname + "/../" ); -var JS_DIR = ROOT_DIR + '../static/js/'; -var CSS_DIR = ROOT_DIR + '../static/css/'; -var CACHE_DIR = path.join(settings.root, 'var'); -======= -var ROOT_DIR = path.normalize(__dirname + "/../../static/"); ->>>>>>> pita -var TAR_PATH = path.join(__dirname, 'tar.json'); -var tar = JSON.parse(fs.readFileSync(TAR_PATH, 'utf8')); - -// Rewrite tar to include modules with no extensions and proper rooted paths. -exports.tar = {}; -for (var key in tar) { - exports.tar['/' + key] = - tar[key].map(function (p) {return '/' + p}).concat( - tar[key].map(function (p) {return '/' + p.replace(/\.js$/, '')}) - ); -} - -/** - * creates the minifed javascript for the given minified name - * @param req the Express request - * @param res the Express response - */ -exports.minify = function(req, res, next) -{ -<<<<<<< HEAD - var jsFilename = req.params[0]; - - //choose the js files we need - var jsFiles = undefined; - if (Object.prototype.hasOwnProperty.call(tar, jsFilename)) { - jsFiles = tar[jsFilename]; - } else { - /* Not in tar list, but try anyways, if it fails, pass to `next`. - Actually try, not check in filesystem here because - we don't want to duplicate the require.resolve() handling - */ - jsFiles = [jsFilename]; - } - _handle(req, res, jsFilename, jsFiles, function (err) { - console.log("Unable to load minified file " + jsFilename + ": " + err.toString()); - /* Throw away error and generate a 404, not 500 */ - next(); - }); -} - -function _handle(req, res, jsFilename, jsFiles, next) { - res.header("Content-Type","text/javascript"); - - var cacheName = CACHE_DIR + "/minified_" + jsFilename.replace(/\//g, "_"); - - //minifying is enabled - if(settings.minify) - { - var result = undefined; - var latestModification = 0; - - async.series([ - //find out the highest modification date - function(callback) - { - var folders2check = [CSS_DIR, JS_DIR]; - - //go trough this two folders - async.forEach(folders2check, function(path, callback) - { - //read the files in the folder - fs.readdir(path, function(err, files) - { - if(ERR(err, callback)) return; - - //we wanna check the directory itself for changes too - files.push("."); - - //go trough all files in this folder - async.forEach(files, function(filename, callback) - { - //get the stat data of this file - fs.stat(path + "/" + filename, function(err, stats) - { - if(ERR(err, callback)) return; - - //get the modification time - var modificationTime = stats.mtime.getTime(); - - //compare the modification time to the highest found - if(modificationTime > latestModification) - { - latestModification = modificationTime; - } - - callback(); - }); - }, callback); - }); - }, callback); - }, - function(callback) - { - //check the modification time of the minified js - fs.stat(cacheName, function(err, stats) - { - if(err && err.code != "ENOENT") - { - ERR(err, callback); - return; - } - - //there is no minfied file or there new changes since this file was generated, so continue generating this file - if((err && err.code == "ENOENT") || stats.mtime.getTime() < latestModification) - { - callback(); - } - //the minified file is still up to date, stop minifying - else - { - callback("stop"); - } - }); - }, - //load all js files - function (callback) - { - var values = []; - tarCode( - jsFiles - , function (content) {values.push(content)} - , function (err) { - if(ERR(err, next)) return; - - result = values.join(''); - callback(); - }); - }, - //put all together and write it into a file - function(callback) - { - async.parallel([ - //write the results plain in a file - function(callback) - { - fs.writeFile(cacheName, result, "utf8", callback); - }, - //write the results compressed in a file - function(callback) - { - zlib.gzip(result, function(err, compressedResult){ - //weird gzip bug that returns 0 instead of null if everything is ok - err = err === 0 ? null : err; - - if(ERR(err, callback)) return; - - fs.writeFile(cacheName + ".gz", compressedResult, callback); - }); - } - ],callback); - } - ], function(err) - { - if(err && err != "stop") - { - if(ERR(err)) return; - } - - //check if gzip is supported by this browser - var gzipSupport = req.header('Accept-Encoding', '').indexOf('gzip') != -1; - - var pathStr; - if(gzipSupport && os.type().indexOf("Windows") == -1) - { - pathStr = path.normalize(cacheName + ".gz"); - res.header('Content-Encoding', 'gzip'); - } - else - { - pathStr = path.normalize(cacheName); - } - - res.sendfile(pathStr, { maxAge: server.maxAge }); - }) - } - //minifying is disabled, so put the files together in one file - else - { - tarCode( - jsFiles - , function (content) {res.write(content)} - , function (err) { - if(ERR(err, next)) return; -======= - var filename = req.params['filename']; - - // No relative paths, especially if they may go up the file hierarchy. - filename = path.normalize(path.join(ROOT_DIR, filename)); - if (filename.indexOf(ROOT_DIR) == 0) { - filename = filename.slice(ROOT_DIR.length); - filename = filename.replace(/\\/g, '/'); // Windows (safe generally?) - } else { - res.writeHead(404, {}); - res.end(); - return; - } - - // What content type should this be? - // TODO: This should use a MIME module. - var contentType; - if (filename.match(/\.js$/)) { - contentType = "text/javascript"; - } else if (filename.match(/\.css$/)) { - contentType = "text/css"; - } else if (filename.match(/\.html$/)) { - contentType = "text/html"; - } else if (filename.match(/\.txt$/)) { - contentType = "text/plain"; - } else if (filename.match(/\.png$/)) { - contentType = "image/png"; - } else if (filename.match(/\.gif$/)) { - contentType = "image/gif"; - } else if (filename.match(/\.ico$/)) { - contentType = "image/x-icon"; - } else { - contentType = "application/octet-stream"; - } - - statFile(filename, function (error, date, exists) { - if (date) { - date = new Date(date); - res.setHeader('last-modified', date.toUTCString()); - res.setHeader('date', (new Date()).toUTCString()); - if (server.maxAge) { - var expiresDate = new Date((new Date()).getTime()+server.maxAge*1000); - res.setHeader('expires', expiresDate.toUTCString()); - res.setHeader('cache-control', 'max-age=' + server.maxAge); - } - } - - if (error) { - res.writeHead(500, {}); ->>>>>>> pita - res.end(); - } else if (!exists) { - res.writeHead(404, {}); - res.end(); - } else if (new Date(req.headers['if-modified-since']) >= date) { - res.writeHead(304, {}); - res.end(); - } else { - if (req.method == 'HEAD') { - res.header("Content-Type", contentType); - res.writeHead(200, {}); - res.end(); - } else if (req.method == 'GET') { - getFileCompressed(filename, contentType, function (error, content) { - if(ERR(error)) return; - res.header("Content-Type", contentType); - res.writeHead(200, {}); - res.write(content); - res.end(); - }); - } else { - res.writeHead(405, {'allow': 'HEAD, GET'}); - res.end(); - } - } - }); -} - -// find all includes in ace.js and embed them. -function getAceFile(callback) { - fs.readFile(ROOT_DIR + 'js/ace.js', "utf8", function(err, data) { - if(ERR(err, callback)) return; - - // Find all includes in ace.js and embed them - var founds = data.match(/\$\$INCLUDE_[a-zA-Z_]+\("[^"]*"\)/gi); - if (!settings.minify) { - founds = []; - } - // Always include the require kernel. - founds.push('$$INCLUDE_JS("../static/js/require-kernel.js")'); - - data += ';\n'; - data += 'Ace2Editor.EMBEDED = Ace2Editor.EMBEDED || {};\n'; - - // Request the contents of the included file on the server-side and write - // them into the file. - async.forEach(founds, function (item, callback) { - var filename = item.match(/"([^"]*)"/)[1]; - var request = require('request'); - - var baseURI = 'http://localhost:' + settings.port - - request(baseURI + path.normalize(path.join('/static/', filename)), function (error, response, body) { - if (!error && response.statusCode == 200) { - data += 'Ace2Editor.EMBEDED[' + JSON.stringify(filename) + '] = ' - + JSON.stringify(body || '') + ';\n'; - } else { - // Silence? - } - callback(); - }); - }, function(error) { - callback(error, data); - }); - }); -} - -// Check for the existance of the file and get the last modification date. -function statFile(filename, callback) { - if (filename == 'js/ace.js') { - // Sometimes static assets are inlined into this file, so we have to stat - // everything. - lastModifiedDateOfEverything(function (error, date) { - callback(error, date, !error); - }); - } else if (filename == 'js/require-kernel.js') { - callback(null, requireLastModified(), true); - } else { - fs.stat(ROOT_DIR + filename, function (error, stats) { - if (error) { - if (error.code == "ENOENT") { - // Stat the directory instead. - fs.stat(path.dirname(ROOT_DIR + filename), function (error, stats) { - if (error) { - if (error.code == "ENOENT") { - callback(null, null, false); - } else { - callback(error); - } - } else { - callback(null, stats.mtime.getTime(), false); - } - }); - } else { - callback(error); - } - } else { - callback(null, stats.mtime.getTime(), true); - } - }); - } -} -function lastModifiedDateOfEverything(callback) { - var folders2check = [ROOT_DIR + 'js/', ROOT_DIR + 'css/']; - var latestModification = 0; - //go trough this two folders - async.forEach(folders2check, function(path, callback) - { - //read the files in the folder - fs.readdir(path, function(err, files) - { - if(ERR(err, callback)) return; - - //we wanna check the directory itself for changes too - files.push("."); - - //go trough all files in this folder - async.forEach(files, function(filename, callback) - { - //get the stat data of this file - fs.stat(path + "/" + filename, function(err, stats) - { - if(ERR(err, callback)) return; - - //get the modification time - var modificationTime = stats.mtime.getTime(); - - //compare the modification time to the highest found - if(modificationTime > latestModification) - { - latestModification = modificationTime; - } - - callback(); - }); - }, callback); - }); - }, function () { - callback(null, latestModification); - }); -} - -// This should be provided by the module, but until then, just use startup -// time. -var _requireLastModified = new Date(); -function requireLastModified() { - return _requireLastModified.toUTCString(); -} -function requireDefinition() { - return 'var require = ' + RequireKernel.kernelSource + ';\n'; -} - -<<<<<<< HEAD -function tarCode(jsFiles, write, callback) { - write('require.define({'); - var initialEntry = true; - async.forEach(jsFiles, function (filename, callback){ - var path; - var srcPath; - if (filename.indexOf('plugins/') == 0) { - srcPath = filename.substring('plugins/'.length); - path = require.resolve(srcPath); - } else { - srcPath = '/' + filename; - path = JS_DIR + filename; - } - - srcPath = JSON.stringify(srcPath); - var srcPathAbbv = JSON.stringify(srcPath.replace(/\.js$/, '')); - - if (filename == 'ace.js') { - getAceFile(handleFile); - } else { - fs.readFile(path, "utf8", handleFile); - } - - function handleFile(err, data) { - if(ERR(err, callback)) return; - - if (!initialEntry) { - write('\n,'); - } else { - initialEntry = false; - } - write(srcPath + ': ') - data = '(function (require, exports, module) {' + data + '})'; -======= -function getFileCompressed(filename, contentType, callback) { - getFile(filename, function (error, content) { - if (error || !content) { - callback(error, content); - } else { ->>>>>>> pita - if (settings.minify) { - if (contentType == 'text/javascript') { - try { - content = compressJS([content]); - } catch (error) { - // silence - } - } else if (contentType == 'text/css') { - content = compressCSS([content]); - } - } - callback(null, content); - } -<<<<<<< HEAD - }, function (err) { - if(ERR(err, callback)) return; - write('});\n'); - callback(); -======= ->>>>>>> pita - }); -} - -function getFile(filename, callback) { - if (filename == 'js/ace.js') { - getAceFile(callback); - } else if (filename == 'js/require-kernel.js') { - callback(undefined, requireDefinition()); - } else { - fs.readFile(ROOT_DIR + filename, callback); - } -} - -function compressJS(values) -{ - var complete = values.join("\n"); - var ast = jsp.parse(complete); // parse code and get the initial AST - ast = pro.ast_mangle(ast); // get a new AST with mangled names - ast = pro.ast_squeeze(ast); // get an AST with compression optimizations - return pro.gen_code(ast); // compressed code here -} - -function compressCSS(values) -{ - var complete = values.join("\n"); - return cleanCSS.process(complete); -} diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index cb6a64033..e60446df4 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -44,7 +44,7 @@ exports.dbType = "dirty"; /** * This setting is passed with dbType to ueberDB to set up the database */ -exports.dbSettings = { "filename" : path.join(exports.root, "var/dirty.db") }; +exports.dbSettings = { "filename" : path.join(exports.root, "dirty.db") }; /** * The default Text of a new pad */ @@ -106,9 +106,15 @@ if (settingsFilename.charAt(0) != '/') { settingsFilename = path.normalize(path.join(root, settingsFilename)); } -//read the settings sync -var settingsStr = fs.readFileSync(settingsFilename).toString(); - +var settingsStr +try{ + //read the settings sync + settingsStr = fs.readFileSync(settingsFilename).toString(); +} catch(e){ + console.warn('No settings file found. Using defaults.'); + settingsStr = '{}'; +} + //remove all comments settingsStr = settingsStr.replace(/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/gm,"").replace(/#.*/g,"").replace(/\/\/.*/g,""); @@ -146,3 +152,7 @@ for(var i in settings) console.warn("This setting doesn't exist or it was removed"); } } + +if(exports.dbType === "dirty"){ + console.warn("DirtyDB is used. This is fine for testing but not recommended for production.") +} diff --git a/src/node/utils/caching_middleware.js b/src/node/utils/caching_middleware.js index 70d5a08c4..ba2b462df 100644 --- a/src/node/utils/caching_middleware.js +++ b/src/node/utils/caching_middleware.js @@ -73,6 +73,9 @@ CachingMiddleware.prototype = new function () { var _headers = {}; old_res.setHeader = res.setHeader; res.setHeader = function (key, value) { + // Don't set cookies, see issue #707 + if (key.toLowerCase() === 'set-cookie') return; + _headers[key.toLowerCase()] = value; old_res.setHeader.call(res, key, value); }; diff --git a/src/node/utils/tar.json b/src/node/utils/tar.json index 5c1abac5d..15ce68e27 100644 --- a/src/node/utils/tar.json +++ b/src/node/utils/tar.json @@ -1,13 +1,7 @@ { "pad.js": [ - "jquery.js" - , "underscore.js" - , "security.js" - , "pad.js" - , "ace2_common.js" + "pad.js" , "pad_utils.js" - , "undo-xpopup.js" - , "json2.js" , "pad_cookie.js" , "pad_editor.js" , "pad_editbar.js" @@ -24,14 +18,9 @@ , "farbtastic.js" ] , "timeslider.js": [ - "jquery.js" - , "underscore.js" - , "security.js" - , "undo-xpopup.js" - , "json2.js" + "timeslider.js" , "colorutils.js" , "draggable.js" - , "ace2_common.js" , "pad_utils.js" , "pad_cookie.js" , "pad_editor.js" @@ -48,16 +37,12 @@ , "broadcast.js" , "broadcast_slider.js" , "broadcast_revisions.js" - , "timeslider.js" ] , "ace2_inner.js": [ - "ace2_common.js" - , "underscore.js" - , "rjquery.js" + "ace2_inner.js" , "AttributePool.js" , "Changeset.js" , "ChangesetUtils.js" - , "security.js" , "skiplist.js" , "virtual_lines.js" , "cssmanager.js" @@ -68,6 +53,17 @@ , "linestylefilter.js" , "domline.js" , "AttributeManager.js" - , "ace2_inner.js" + ] +, "ace2_common.js": [ + "ace2_common.js" + , "jquery.js" + , "rjquery.js" + , "underscore.js" + , "security.js" + , "json2.js" + , "pluginfw/plugins.js" + , "pluginfw/hooks.js" + , "pluginfw/async.js" + , "pluginfw/parent_require.js" ] } diff --git a/src/package.json b/src/package.json index ac56bc358..c46abbbf6 100644 --- a/src/package.json +++ b/src/package.json @@ -10,11 +10,11 @@ "name": "Robin Buse" } ], "dependencies" : { - "yajsml" : "1.1.2", + "yajsml" : "1.1.3", "request" : "2.9.100", "require-kernel" : "1.0.5", "resolve" : "0.2.1", - "socket.io" : "0.8.7", + "socket.io" : "0.9.6", "ueberDB" : "0.1.7", "async" : "0.1.18", "express" : "2.5.8", @@ -32,6 +32,7 @@ "semver" : "1.0.13", "underscore" : "1.3.1" }, + "bin": { "etherpad-lite": "./node/server.js" }, "devDependencies": { "jshint" : "*" }, diff --git a/src/static/css/admin.css b/src/static/css/admin.css index b2dfc1c5c..5eb008fa0 100644 --- a/src/static/css/admin.css +++ b/src/static/css/admin.css @@ -1,6 +1,5 @@ body { margin: 0; - height: 100%; color: #333; font: 14px helvetica, sans-serif; background: #ddd; @@ -26,7 +25,7 @@ h1 { h2 { font-size: 24px; } -.seperator { +.separator { margin: 10px 0; height: 1px; background: #aaa; diff --git a/src/static/css/iframe_editor.css b/src/static/css/iframe_editor.css index d2d2f9774..4fcd955f3 100644 --- a/src/static/css/iframe_editor.css +++ b/src/static/css/iframe_editor.css @@ -5,6 +5,13 @@ html { cursor: text; } /* in Safari, produces text cursor for whole doc (inc. below body) */ span { cursor: auto; } +::selection { + background: #acf; +} +::-moz-selection { + background: #acf; +} + a { cursor: pointer !important; } ul, ol, li { diff --git a/src/static/css/pad.css b/src/static/css/pad.css index 76a263eca..19180adee 100644 --- a/src/static/css/pad.css +++ b/src/static/css/pad.css @@ -23,18 +23,17 @@ iframe { display: none; } #users { - position: absolute; - z-index: 500; - background-color: #000; - background-color: rgba(0,0,0,0.7); + background: #f7f7f7; + background: -webkit-linear-gradient( #F7F7F7,#EEE); + background: -moz-linear-gradient( #F7F7F7,#EEE); + background: -ms-linear-gradient( #F7F7F7,#EEE); + background: -o-linear-gradient( #F7F7F7,#EEE); + background: linear-gradient( #F7F7F7,#EEE); width: 160px; - right: 20px; - top: 40px; color: #fff; padding: 5px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; + border-radius: 0 0 6px 6px; + border: 1px solid #ccc; } #otherusers { max-height: 400px; @@ -44,14 +43,6 @@ a img { border: 0 } /* menu */ -.toolbar ul { - position: relative; - list-style: none; - padding-right: 3px; - padding-left: 1px; - z-index: 2; - overflow: hidden; -} .toolbar { background: #f7f7f7; background: -webkit-linear-gradient(#f7f7f7, #f1f1f1 80%); @@ -61,40 +52,38 @@ a img { background: linear-gradient(#f7f7f7, #f1f1f1 80%); border-bottom: 1px solid #ccc; overflow: hidden; - padding-top: 3px; + padding-top: 4px; width: 100%; white-space: nowrap; height: 32px; } -.toolbar ul li { - background: #fff; - background: -webkit-linear-gradient(#fff, #f0f0f0); - background: -moz-linear-gradient(#fff, #f0f0f0); - background: -o-linear-gradient(#fff, #f0f0f0); - background: -ms-linear-gradient(#fff, #f0f0f0); - background: linear-gradient(#fff, #f0f0f0); - border: 1px solid #ccc; - -webkit-border-radius: 4px; - -moz-border-radius: 4px; - border-radius: 4px; - cursor: pointer; - float: left; - height: 18px; - margin-left: 2px; - overflow: hidden; - padding: 4px 5px; - width: 18px; -} -.toolbar ul li a { - text-decoration: none; - color: #ccc; - position: absolute; -} -.toolbar ul li a span { +.toolbar ul { position: relative; - top: -2px; + list-style: none; + padding-right: 3px; + padding-left: 1px; + z-index: 2; + overflow: hidden; + float: left } -.toolbar ul li:hover { +.toolbar ul.menu_right { + float: right +} +.toolbar ul li { + float: left; + margin-left: 2px; +} +.toolbar ul li.separator { + border: inherit; + background: inherit; + visibility: hidden; + width: 0px; + padding: 5px; +} +.toolbar ul li a:hover { + text-decoration: none; +} +.toolbar ul li a:hover { background: #fff; background: -webkit-linear-gradient(#f4f4f4, #e4e4e4); background: -moz-linear-gradient(#f4f4f4, #e4e4e4); @@ -102,7 +91,7 @@ a img { background: -ms-linear-gradient(#f4f4f4, #e4e4e4); background: linear-gradient(#f4f4f4, #e4e4e4); } -.toolbar ul li:active { +.toolbar ul li a:active { background: #eee; background: -webkit-linear-gradient(#ddd, #fff); background: -moz-linear-gradient(#ddd, #fff); @@ -113,31 +102,73 @@ a img { -moz-box-shadow: 0 0 8px rgba(0,0,0,.1) inset; box-shadow: 0 0 8px rgba(0,0,0,.1) inset; } -.toolbar ul li.separator { - border: inherit; - background: inherit; - visibility: hidden; - width: 0px; -} .toolbar ul li a { - display: block + background: #fff; + background: -webkit-linear-gradient(#fff, #f0f0f0); + background: -moz-linear-gradient(#fff, #f0f0f0); + background: -o-linear-gradient(#fff, #f0f0f0); + background: -ms-linear-gradient(#fff, #f0f0f0); + background: linear-gradient(#fff, #f0f0f0); + border: 1px solid #ccc; + border-radius: 3px; + color: #ccc; + cursor: pointer; + display: inline-block; + min-height: 18px; + overflow: hidden; + padding: 4px 5px; + text-align: center; + text-decoration: none; + min-width: 18px; } -.toolbar ul li a img { - padding: 1px +.toolbar ul li a .buttonicon { + position: relative; + top: 1px; } -.toolbar ul { - float: left +.toolbar ul li a.grouped-left { + border-radius: 3px 0 0 3px; } -.toolbar ul.menu_right { - float: right +.toolbar ul li a.grouped-middle { + border-radius: 0; + margin-left: -2px; + border-left: 0; } -#users { - display: none +.toolbar ul li a.grouped-right { + border-radius: 0 3px 3px 0; + margin-left: -2px; + border-left: 0; +} +.toolbar ul li a.selected { + background: #eee !important; + background: -webkit-linear-gradient(#EEE, #F0F0F0) !important; + background: -moz-linear-gradient(#EEE, #F0F0F0) !important; + background: -o-linear-gradient(#EEE, #F0F0F0) !important; + background: -ms-linear-gradient(#EEE, #F0F0F0) !important; + background: linear-gradient(#EEE, #F0F0F0) !important; +} +.toolbar ul li select { + background: #fff; + padding: 4px; + line-height: 22px; /* fix for safari (win/mac) */ + height: 28px; /* fix for chrome (mac) */ + border-radius: 3px; + border: 1px solid #ccc; + outline: none; +} +#usericon a { + min-width: 30px; + text-align: left; +} +#usericon a #online_count { + color: #777; + font-size: 10px; + position: relative; + top: 2px; } #editorcontainer { position: absolute; width: 100%; - top: 36px; + top: 37px; /* + 1px border */ left: 0px; bottom: 0px; z-index: 1; @@ -171,232 +202,6 @@ a img { bottom: 0px; width: 100%; } -.maximized #padpage { - left: 8px; - right: 8px; - width: auto; - margin-left: 0; -} -body.fullwidth #padpage { - width: auto; - margin-left: 6px; - margin-right: 6px; -} -body.squish1width #padpage { - width: 800px -} -body.squish2width #padpage { - width: 700px -} -a#backtoprosite, -#accountnav { - display: block; - position: absolute; - height: 15px; - line-height: 15px; - width: auto; - top: 5px; - font-size: 1.2em; - display: none; -} -a#backtoprosite, -#accountnav a { - color: #cde7ff; - text-decoration: underline; -} -a#backtoprosite { - padding-left: 20px; - left: 6px; - background: url(static/img/protop.gif) no-repeat -5px -6px; -} -#accountnav { - right: 30px; - color: #fff; -} -#specialkeyarea { - top: 5px; - left: 250px; - color: yellow; - font-weight: bold; - font-size: 1.5em; - position: absolute; -} -#alertbar { - margin-top: 6px; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; - filter: alpha(opacity=0); - opacity: 0; - display: none; - position: absolute; - left: 0; - right: 0; - z-index: 53; -} -#servermsg { - position: relative; - zoom: 1; - border: 1px solid #992; - background: #ffc; - padding: 0.8em; - font-size: 1.2em; -} -#servermsg h3 { - font-weight: bold; - margin-right: 10px; - margin-bottom: 1em; - float: left; - width: auto; -} -#servermsg #servermsgdate { - font-style: italic; - font-weight: normal; - color: #666; -} -a#hidetopmsg { - position: absolute; - right: 5px; - bottom: 5px; -} -#shuttingdown { - position: relative; - zoom: 1; - border: 1px solid #992; - background: #ffc; - padding: 0.6em; - font-size: 1.2em; - margin-top: 6px; -} -#docbar { - margin-top: 6px; - height: 25px; - position: relative; - zoom: 1; - background: #fbfbfb url(static/img/padtopback2.gif) repeat-x 0 -31px; -} -.docbarbutton { - padding-top: 2px; - padding-bottom: 2px; - padding-left: 4px; - padding-right: 4px; - border-left: 1px solid #CCC; - white-space: nowrap; -} -.docbarbutton img { - border: 0px; - width: 13px; - margin-right: 2px; - vertical-align: middle; - margin-top: 3px; - margin-bottom: 2px; -} -.menu, -.menu ul { - font-size: 10pt; - list-style-type: none; -} -.menu ul { - padding-left: 20px -} -.menu a { - font-size: 10px; - line-height: 18px; - text-decoration: none; - color: #444; - font-weight: bold; -} -.docbarbutton.highlight { - background-color: #fef2bd; - border: 1px solid #CCC; - border-right: 0px; -} -#docbarleft { - position: absolute; - left: 0; - top: 0; - height: 100%; - overflow: hidden; - background: url(static/img/padtop5.gif) no-repeat left -31px; - width: 7px; -} -#docbarpadtitle { - position: absolute; - height: auto; - left: 9px; - width: 280px; - font-size: 1.6em; - color: #444; - font-weight: normal; - line-height: 22px; - margin-left: 2px; - height: 22px; - top: 2px; - overflow: hidden; /*not supported in FF*/ - -o-text-overflow: ellipsis; - -ms-text-overflow: ellipsis; - text-overflow: ellipsis; - white-space: nowrap; -} -.docbar-public #docbarpadtitle { - padding-left: 22px; - background: url(static/img/public.gif) no-repeat left center; -} -#docbarrenamelink { - position: absolute; - top: 6px; - font-size: 1.1em; - display: none; -} -#docbarrenamelink a { - color: #999 -} -#docbarrenamelink a:hover { - color: #48d -} -#padtitlebuttons { - position: absolute; - width: 74px; - zoom: 1; - height: 17px; - top: 4px; - left: 170px; - display: none; - background: url(static/img/ok_or_cancel.gif) 0px 0px; -} -#padtitlesave { - position: absolute; - display: block; - height: 0; - padding-top: 17px; - overflow: hidden; - width: 23px; - left: 0; - top: 0; -} -#padtitlecancel { - position: absolute; - display: block; - height: 0; - padding-top: 17px; - overflow: hidden; - width: 35px; - right: 0; - top: 0; -} -#padtitleedit { - position: absolute; - top: 2px; - left: 5px; - height: 15px; - padding: 2px; - font-size: 1.4em; - background: white; - border-left: 1px solid #c3c3c3; - border-top: 1px solid #c3c3c3; - border-right: 1px solid #e6e6e6; - border-bottom: 1px solid #e6e6e6; - width: 150px; - display: none; -} #padmain { margin-top: 0px; position: absolute; @@ -414,34 +219,6 @@ a#hidetopmsg { top: 0; zoom: 1; } -.hidesidebar #padeditor { - right: 0 -} -#vdraggie { - /* background: url(static/img/vdraggie.gif) no-repeat top center;;*/ - width: 16px; - height: 16px; - background-image: url('../../static/img/etherpad_lite_icons.png'); - background-repeat: no-repeat; - background-position: 0px -300px; - cursor: W-resize; - bottom: 0; - position: absolute; - right: 268px; - top: 0; - width: 56px; - z-index: 10; -} -.toolbarsavetable { - position: absolute; - top: 6px; - right: 8px; - height: 24px; -} -.toolbarsavetable td, -.toolbartable td { - white-space: nowrap -} #myswatchbox { position: absolute; left: 5px; @@ -465,31 +242,13 @@ a#hidetopmsg { top: 0px; z-index: 101; display: none; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - background: rgba(0, 0, 0, 0.7); + border-radius: 0 0 6px 6px; + background: #f7f7f7; + border: 1px solid #ccc; + border-top: 0; padding-left: 10px; padding-top: 10px; } -/* -#mycolorpicker ul li - { - -float: left; - -} - -#mycolorpicker .picked { - border: 1px solid #000 !important; - } - - -#mycolorpicker .picked .pickerswatch { - border: 1px solid #fff; - } - - */ #mycolorpickersave { left: 10px; font-weight: bold; @@ -580,6 +339,10 @@ float: left; #myusernameform .editempty { color: #333 } +#myswatchbox, #myusernameedit, #otheruserstable .swatch { + border: 1px solid #ccc !important; + color: #333; +} table#otheruserstable { display: none } @@ -596,7 +359,7 @@ table#otheruserstable { height: 26px; vertical-align: middle; padding: 0 2px; - color: #fff; + color: #333; } #otheruserstable .swatch { border: 1px solid #000; @@ -752,73 +515,6 @@ table#otheruserstable { font-size: 12pt; padding: 5px; } -/* We give docbar a higher z-index than its descendant impexp-wrapper in -order to allow the Import/Export panel to be on top of stuff lower -down on the page in IE. Strange but it works! */ -#docbar { - z-index: 52 -} -#impexp-wrapper { - width: 650px; - right: 10px; -} -#impexp-panel { - height: 160px -} -.docbarimpexp-closing #impexp-wrapper { - z-index: 50 -} -#savedrevs-wrapper { - width: 100%; - left: 0; -} -#savedrevs-panel { - height: 79px -} -.docbarsavedrevs-closing #savedrevs-wrapper { - z-index: 50 -} -#savedrevs-wrapper .dbpanel-rightedge { - background-position: 0 -10px -} -#options-wrapper { - width: 340px; - right: 200px; -} -#options-panel { - height: 114px -} -.docbaroptions-closing #options-wrapper { - z-index: 50 -} -#security-wrapper { - width: 320px; - right: 300px; -} -#security-panel { - height: 130px -} -.docbarsecurity-closing #security-wrapper { - z-index: 50 -} -#revision-notifier { - position: absolute; - right: 8px; - top: 25px; - width: auto; - height: auto; - font-size: 1.2em; - background: #ffc; - border: 1px solid #aaa; - color: #444; - padding: 3px 5px; - display: none; - z-index: 55; -} -#revision-notifier .label { - color: #777; - font-weight: bold; -} #mainmodals { z-index: 600; /* higher than the modals themselves: */ } @@ -830,17 +526,6 @@ down on the page in IE. Strange but it works! */ #mainmodals .editempty { color: #aaa } -.expand-collapse { - height: 22px; - background-image: url(static/img/sharedistri.gif); - background-repeat: no-repeat; - background-position: 0 3px; - padding-left: 17px; - text-decoration: none; -} -.expand-collapse.expanded { - background-position: 0 -31px -} .modaldialog { position: absolute; top: 100px; @@ -878,91 +563,7 @@ down on the page in IE. Strange but it works! */ vertical-align: top; text-align: left; } -.sharebox-url { - width: 440px; - height: 18px; - text-align: left; - font-size: 1.3em; - line-height: 18px; - padding: 2px; -} -#sharebox-send { - float: right; - background-repeat: no-repeat; - background-image: url(static/img/sharebox4.gif); - display: block; - width: 87px; - height: 22px; - background-position: -383px -289px; -} -#viewbarcontents { - display: none -} -#viewzoomtitle { - position: absolute; - left: 10px; - top: 4px; - height: 20px; - line-height: 20px; - width: auto; -} -#viewzoommenu { - width: 65px -} -#bottomarea { - height: 28px; - overflow: hidden; - position: absolute; - height: 28px; - bottom: 0px; - left: 0px; - right: 0px; - font-size: 1.2em; - color: #444; -} -#widthprefcheck { - position: absolute; - background-image: url(static/img/layoutbuttons.gif); - background-repeat: no-repeat; - cursor: pointer; - width: 86px; - height: 20px; - top: 4px; - right: 2px; -} -.widthprefunchecked { - background-position: -1px -1px -} -.widthprefchecked { - background-position: -1px -23px -} -#sidebarcheck { - position: absolute; - background-image: url(static/img/layoutbuttons.gif); - background-repeat: no-repeat; - cursor: pointer; - width: 86px; - height: 20px; - top: 4px; - right: 90px; -} -.sidebarunchecked { - background-position: -1px -45px -} -.sidebarchecked { - background-position: -1px -67px -} -#feedbackbutton { - display: block; - position: absolute; - width: 68px; - height: 0; - padding-top: 17px; - overflow: hidden; - background: url(static/img/bottomareagfx.gif); - top: 5px; - right: 220px; -} + #modaloverlay { z-index: 500; display: none; @@ -981,67 +582,7 @@ down on the page in IE. Strange but it works! */ background-image: none; background-repeat: no-repeat; /* scale the image */ } -a#topbarmaximize { - float: right; - width: 16px; - height: 16px; - margin-right: -143px; - margin-top: 4px; - background: url(static/img/maximize_normal.png); -} -.maximized a#topbarmaximize { - background: url(static/img/maximize_maximized.png) -} -.toolbarinner h1 { - line-height: 29px; - font-size: 16px; - padding-left: 6pt; - margin-top: 0; - white-space: nowrap; -} -.toolbarinner h1 a { - font-size: 12px -} -.bigbutton { - display: block; - background-color: #a3bde0; - color: #555555; - border-style: solid; - border-width: 2px; - border-left-color: #d6e2f1; - border-right-color: #86aee1; - border-top-color: #d6e2f1; - border-bottom-color: #86aee1; - margin: 10pt; - text-align: center; - text-decoration: none; - padding: 50pt; - font-size: 20pt; - -webkit-border-radius: 3pt; - -moz-border-radius: 3pt; - border-radius: 3pt; -} -.modaldialog .bigbutton { - padding-left: 0; - padding-right: 0; - width: 100%; -} -ul#colorpickerswatches { - padding-left: 3px; - padding-top: 5px; -} -ul#colorpickerswatches li { - border: 1px solid #ccc; - width: 14px; - height: 14px; - overflow: hidden; - margin: 3px 6px; - padding: 0px; -} -ul#colorpickerswatches li:hover { - border: 1px solid #000; - cursor: pointer; -} + #chatbox { position: absolute; bottom: 0px; @@ -1115,8 +656,8 @@ ul#colorpickerswatches li:hover { text-decoration: none } #chatcounter { - color: #555; - font-size: 9px; + color: #777; + font-size: 10px; vertical-align: middle; } #titlebar { @@ -1149,31 +690,13 @@ ul#colorpickerswatches li:hover { margin-top: 2px; } .exporttype { - margin-top: 2px; + margin-top: 4px; background-repeat: no-repeat; padding-left: 25px; background-image: url("../../static/img/etherpad_lite_icons.png"); - color: #fff; + color: #333; text-decoration: none; } -#importexportline { - border-left: 1px solid #fff; - height: 190px; - position: absolute; - width: 0px; - left: 260px; - -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; - filter: alpha(opacity=80); - opacity: .8; -} -.impexpbutton { - background-image: -webkit-linear-gradient(center top , #EEEEEE, white 20%, white 20%); - background-image: -moz-linear-gradient(center top , #EEEEEE, white 20%, white 20%); - background-image: -o-linear-gradient(center top , #EEEEEE, white 20%, white 20%); - background-image: -ms-linear-gradient(center top , #EEEEEE, white 20%, white 20%); - background-image: linear-gradient(center top , #EEEEEE, white 20%, white 20%); - padding: 3px; -} #exporthtml { background-position: 0px -299px } @@ -1189,9 +712,6 @@ ul#colorpickerswatches li:hover { #exportopen { background-position: 0px -347px } -#exportwordle { - background-position: 0px -323px -} #exportdokuwiki { background-position: 0px -459px } @@ -1238,8 +758,8 @@ ul#colorpickerswatches li:hover { height: 16px; background-image: url('../../static/img/etherpad_lite_icons.png'); background-repeat: no-repeat; - margin-left: 1px; - margin-top: 1px; + display: inline-block; + vertical-align: middle; } .buttonicon-bold { background-position: 0px -116px @@ -1288,20 +808,13 @@ ul#colorpickerswatches li:hover { } .buttonicon-chat { background-position: 0px -102px; - display: inline-block; - vertical-align: middle; - margin: 0 !important; } .buttonicon-showusers { background-position: 0px -183px; - display: inline-block; } .buttonicon-savedRevision { background-position: 0px -493px } -#usericon { - width: 33px !important -} #focusprotector { z-index: 100; position: absolute; @@ -1317,34 +830,6 @@ ul#colorpickerswatches li:hover { } #online_count { color: #888; - font-size: 11px; - line-height: 18px; - position: fixed; -} -#qr_center { - margin: 10px 10px auto 0; - text-align: center; -} -#embedreadonlyqr { - -webkit-box-shadow: 0 0 10px #000; - -moz-box-shadow: 0 0 10px #000; - box-shadow: 0 0 10px #000; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - border-radius: 3px; - -webkit-transition: all .2s ease-in-out; - -moz-transition: all .2s ease-in-out; - -o-transition: all .2s ease-in-out; - -ms-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; -} -#embedreadonlyqr:hover { - cursor: none; - -webkit-transform: scale(1.5); - -moz-transform: scale(1.5); - -o-transform: scale(1.5); - -ms-transform: scale(1.5); - transform: scale(1.5); } .rtl { direction: RTL @@ -1362,22 +847,19 @@ input[type=checkbox] { .popup { font-size: 14px; width: 450px; - z-index: 500; padding: 10px; - -webkit-border-radius: 6px; - -moz-border-radius: 6px; - border-radius: 6px; - background: #222; - background: rgba(0,0,0,.7); - background: -webkit-linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.7) 35px, rgba(0,0,0,.6)); - background: -moz-linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.7) 35px, rgba(0,0,0,.6)); - background: -o-linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.7) 35px, rgba(0,0,0,.6)); - background: -ms-linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.7) 35px, rgba(0,0,0,.6)); - background: linear-gradient(rgba(0,0,0,.6), rgba(0,0,0,.7) 35px, rgba(0,0,0,.6)); + border-radius: 0 0 6px 6px; + border: 1px solid #ccc; + background: #f7f7f7; + background: -webkit-linear-gradient(#F7F7F7, #EEE); + background: -moz-linear-gradient(#F7F7F7, #EEE); + background: -ms-linear-gradient(#F7F7F7, #EEE); + background: -o-linear-gradient(#F7F7F7, #EEE); + background: linear-gradient(#F7F7F7, #EEE); -webkit-box-shadow: 0 0 8px #888; -moz-box-shadow: 0 0 8px #888; - box-shadow: 0 0 8px #888; - color: #fff; + box-shadow: 0 2px 4px #ddd; + color: #222; } .popup input[type=text] { width: 100%; @@ -1389,13 +871,18 @@ input[type=checkbox] { display: block; margin-top: 10px; } +.popup input[type=text], #users input[type=text] { + outline: none; +} .popup a { text-decoration: none } .popup h1 { + color: #555; font-size: 18px } .popup h2 { + color: #777; font-size: 15px } .popup p { @@ -1405,31 +892,20 @@ input[type=checkbox] { float: left; width: 50%; } -#settingsmenu, +#settings, #importexport, -#embed { +#embed, +#users { position: absolute; - top: 55px; + top: 36px; right: 20px; display: none; -} -.note { - color: #ddd; - font-size: 11px; - font-weight: bold; -} -.selected { - background: #eee !important; - background: -webkit-linear-gradient(#EEE, #F0F0F0) !important; - background: -moz-linear-gradient(#EEE, #F0F0F0) !important; - background: -o-linear-gradient(#EEE, #F0F0F0) !important; - background: -ms-linear-gradient(#EEE, #F0F0F0) !important; - background: linear-gradient(#EEE, #F0F0F0) !important; + z-index: 500; } .stickyChat { background-color: #f1f1f1 !important; right: 0px !important; - top: 36px; + top: 37px; -webkit-border-radius: 0px !important; -moz-border-radius: 0px !important; border-radius: 0px !important; @@ -1448,24 +924,21 @@ input[type=checkbox] { } } @media screen and (max-width: 600px) { - .toolbar ul li { + .toolbar ul li.separator { + display: none; + } + .toolbar ul li a { padding: 4px 1px } } -@media only screen and (min-device-width: 320px) and (max-device-width: 720px) { - .toolbar ul li { - padding: 4px 3px - } +@media only screen and (min-device-width: 320px) and (max-device-width: 720px) { #users { - right: 0; top: 36px; - bottom: 33px; - -webkit-border-radius: none; - -moz-border-radius: none; + bottom: 40px; border-radius: none; } #mycolorpicker { - left: -72px; + left: -73px; /* #mycolorpicker: width -#users: width */; } #editorcontainer { @@ -1485,58 +958,20 @@ input[type=checkbox] { bottom: 0; border-top: 1px solid #ccc; } - .toolbar ul.menu_right li:last-child { - height: 24px; - -webkit-border-radius: 0; - -moz-border-radius: 0; - border-radius: 0; - margin-top: 0; - border: 0; + .toolbar ul.menu_right > li:last-child { float: right; } - #chaticon { - bottom: 3px; - right: 55px; - border-right: none; - -webkit-border-radius: 0; - -moz-border-radius: 0; + .toolbar ul.menu_right > li a { border-radius: 0; - background: #f7f7f7; - background: -webkit-linear-gradient(#f7f7f7, #f1f1f1 80%); - background: -moz-linear-gradient(#f7f7f7, #f1f1f1 80%); - background: -o-linear-gradient(#f7f7f7, #f1f1f1 80%); - background: -ms-linear-gradient(#f7f7f7, #f1f1f1 80%); - background: linear-gradient(#f7f7f7, #f1f1f1 80%); - border: 0; - } - #chatbox { - bottom: 32px; - right: 0; - border-top-right-radius: 0; - border-right: none; - } - .toolbar ul li a span { - top: -3px - } - #usericonback { - margin-top: 4px - } - #qrcode { - display: none - } - .toolbar ul.menu_right li:not(:last-child) { - display: block - } - .toolbar ul.menu_right > li { - background: none; border: none; - margin-top: 4px; - padding: 4px 8px; + background: none; + margin: 0; + padding: 8px; } - .selected { + .toolbar ul li a.selected { background: none !important } - #timesliderlink { + #chaticon, #timesliderlink { display: none !important } .popup { @@ -1549,7 +984,7 @@ input[type=checkbox] { box-sizing: border-box; width: 100%; } - #settingsmenu, + #settings, #importexport, #embed { left: 0; @@ -1557,7 +992,7 @@ input[type=checkbox] { bottom: 33px; right: 0; } - .separator { + .toolbar ul li .separator { display: none } #online_count { diff --git a/src/static/js/ace.js b/src/static/js/ace.js index 85801d33e..26d6c0eb6 100644 --- a/src/static/js/ace.js +++ b/src/static/js/ace.js @@ -177,19 +177,18 @@ require.setGlobalKeyPath("require");\n\ } function pushScriptsTo(buffer) { /* Folling is for packaging regular expression. */ - /* $$INCLUDE_JS("../javascripts/src/ace2_inner.js?callback=require.define"); */ - var ACE_SOURCE = '../javascripts/src/ace2_inner.js?callback=require.define'; + /* $$INCLUDE_JS("../javascripts/lib/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define"); */ + /* $$INCLUDE_JS("../javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define"); */ + var ACE_SOURCE = '../javascripts/lib/ep_etherpad-lite/static/js/ace2_inner.js?callback=require.define'; + var ACE_COMMON = '../javascripts/lib/ep_etherpad-lite/static/js/ace2_common.js?callback=require.define'; if (Ace2Editor.EMBEDED && Ace2Editor.EMBEDED[ACE_SOURCE]) { buffer.push(''); hooks.callAll("aceInitInnerdocbodyHead", { iframeHTML: iframeHTML }); - // For compatability's sake transform in and out. - for (var i = 0, ii = iframeHTML.length; i < ii; i++) { - iframeHTML[i] = JSON.stringify(iframeHTML[i]); - } - for (var i = 0, ii = iframeHTML.length; i < ii; i++) { - iframeHTML[i] = JSON.parse(iframeHTML[i]); - } - // calls to these functions ($$INCLUDE_...) are replaced when this file is processed // and compressed, putting the compressed code from the named file directly into the // source here. @@ -269,23 +259,22 @@ require.setGlobalKeyPath("require");\n\ pushStyleTagsFor(iframeHTML, includedCSS); var includedJS = []; - var $$INCLUDE_JS = function(filename) {includedJS.push(filename)}; pushRequireScriptTo(iframeHTML); + pushScriptsTo(iframeHTML); + // Inject my plugins into my child. iframeHTML.push('\ \ '); - pushScriptsTo(iframeHTML); + + iframeHTML.push(' - - + + + +