Popup for app specific settings.
This commit is contained in:
parent
8a92cd21d6
commit
553773f2e1
|
@ -157,3 +157,14 @@ a.bookmarklet { background-color: #ddd; border:1px solid #ccc; padding: 5px;padd
|
||||||
#categorylist li { background:#f8f8f8; padding:.3em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
|
#categorylist li { background:#f8f8f8; padding:.3em .8em; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; -webkit-transition:background-color 500ms; -moz-transition:background-color 500ms; -o-transition:background-color 500ms; transition:background-color 500ms; }
|
||||||
#categorylist li:hover, li:active { background:#eee; }
|
#categorylist li:hover, li:active { background:#eee; }
|
||||||
#category_addinput { width: 10em; }
|
#category_addinput { width: 10em; }
|
||||||
|
|
||||||
|
/* ---- APP SETTINGS ---- */
|
||||||
|
.popup { background-color: white; border-radius: 10px 10px 10px 10px; box-shadow: 0 0 20px #888888; color: #333333; padding: 10px; position: absolute; z-index: 200; }
|
||||||
|
.popup.topright { top: -8px; right: 1em; }
|
||||||
|
.popup.bottomleft { bottom: 1em; left: 8px; }
|
||||||
|
.popup .close { position:absolute; top: 0.2em; right:0.2em; height: 20px; width: 20px; background:url('../img/actions/delete.svg') no-repeat center; }
|
||||||
|
.popup h2 { font-weight: bold; font-size: 1.2em; }
|
||||||
|
.arrow { border-bottom: 10px solid white; border-left: 10px solid transparent; border-right: 10px solid transparent; display: block; height: 0; position: absolute; width: 0; z-index: 201; }
|
||||||
|
.arrow.left { left: -13px; bottom: 1.2em; -webkit-transform: rotate(270deg); -moz-transform: rotate(270deg); -o-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); }
|
||||||
|
.arrow.up { top: -8px; right: 2em; }
|
||||||
|
.arrow.down { -webkit-transform: rotate(180deg); -moz-transform: rotate(180deg); -o-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); }
|
||||||
|
|
|
@ -82,7 +82,7 @@ OC={
|
||||||
if(type){
|
if(type){
|
||||||
link+=type+'/';
|
link+=type+'/';
|
||||||
}
|
}
|
||||||
link+=file;
|
link+=file;
|
||||||
}
|
}
|
||||||
return link;
|
return link;
|
||||||
},
|
},
|
||||||
|
@ -91,9 +91,9 @@ OC={
|
||||||
* @param app the app id to which the image belongs
|
* @param app the app id to which the image belongs
|
||||||
* @param file the name of the image file
|
* @param file the name of the image file
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* if no extension is given for the image, it will automatically decide between .png and .svg based on what the browser supports
|
* if no extension is given for the image, it will automatically decide between .png and .svg based on what the browser supports
|
||||||
*/
|
*/
|
||||||
imagePath:function(app,file){
|
imagePath:function(app,file){
|
||||||
if(file.indexOf('.')==-1){//if no extension is given, use png or svg depending on browser support
|
if(file.indexOf('.')==-1){//if no extension is given, use png or svg depending on browser support
|
||||||
file+=(SVGSupport())?'.svg':'.png';
|
file+=(SVGSupport())?'.svg':'.png';
|
||||||
|
@ -105,7 +105,7 @@ OC={
|
||||||
* @param app the app id to which the script belongs
|
* @param app the app id to which the script belongs
|
||||||
* @param script the filename of the script
|
* @param script the filename of the script
|
||||||
* @param ready event handeler to be called when the script is loaded
|
* @param ready event handeler to be called when the script is loaded
|
||||||
*
|
*
|
||||||
* if the script is already loaded, the event handeler will be called directly
|
* if the script is already loaded, the event handeler will be called directly
|
||||||
*/
|
*/
|
||||||
addScript:function(app,script,ready){
|
addScript:function(app,script,ready){
|
||||||
|
@ -155,7 +155,28 @@ OC={
|
||||||
var date = new Date(1000*mtime);
|
var date = new Date(1000*mtime);
|
||||||
var ret = date.getDate()+'.'+(date.getMonth()+1)+'.'+date.getFullYear()+', '+date.getHours()+':'+date.getMinutes();
|
var ret = date.getDate()+'.'+(date.getMonth()+1)+'.'+date.getFullYear()+', '+date.getHours()+':'+date.getMinutes();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
},
|
||||||
|
|
||||||
|
appSettings:function(app) {
|
||||||
|
var settings = $('#appsettings');
|
||||||
|
if(settings.is(':visible')) {
|
||||||
|
settings.hide().find('.arrow').hide();
|
||||||
|
} else {
|
||||||
|
if($('#journal.settings').length == 0) {
|
||||||
|
var arrowclass = settings.hasClass('topright') ? 'up' : 'left';
|
||||||
|
var jqxhr = $.get(OC.linkTo(app, 'settings.php'), function(data) {
|
||||||
|
$('#appsettings').html(data).ready(function() {
|
||||||
|
settings.prepend('<span class="arrow '+arrowclass+'"></span><h2>'+t('core', 'Settings')+'</h2><a class="close svg"></a>').show();
|
||||||
|
settings.find('.close').bind('click', function() {
|
||||||
|
settings.hide();
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}, 'html');
|
||||||
|
} else {
|
||||||
|
settings.show().find('.arrow').show();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
OC.search.customResults={};
|
OC.search.customResults={};
|
||||||
OC.search.currentResult=-1;
|
OC.search.currentResult=-1;
|
||||||
|
@ -202,7 +223,7 @@ if (!Array.prototype.filter) {
|
||||||
var len = this.length >>> 0;
|
var len = this.length >>> 0;
|
||||||
if (typeof fun != "function")
|
if (typeof fun != "function")
|
||||||
throw new TypeError();
|
throw new TypeError();
|
||||||
|
|
||||||
var res = [];
|
var res = [];
|
||||||
var thisp = arguments[1];
|
var thisp = arguments[1];
|
||||||
for (var i = 0; i < len; i++) {
|
for (var i = 0; i < len; i++) {
|
||||||
|
@ -222,14 +243,14 @@ if (!Array.prototype.indexOf){
|
||||||
Array.prototype.indexOf = function(elt /*, from*/)
|
Array.prototype.indexOf = function(elt /*, from*/)
|
||||||
{
|
{
|
||||||
var len = this.length;
|
var len = this.length;
|
||||||
|
|
||||||
var from = Number(arguments[1]) || 0;
|
var from = Number(arguments[1]) || 0;
|
||||||
from = (from < 0)
|
from = (from < 0)
|
||||||
? Math.ceil(from)
|
? Math.ceil(from)
|
||||||
: Math.floor(from);
|
: Math.floor(from);
|
||||||
if (from < 0)
|
if (from < 0)
|
||||||
from += len;
|
from += len;
|
||||||
|
|
||||||
for (; from < len; from++)
|
for (; from < len; from++)
|
||||||
{
|
{
|
||||||
if (from in this &&
|
if (from in this &&
|
||||||
|
@ -306,7 +327,7 @@ function replaceSVG(){
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* prototypal inharitence functions
|
* prototypal inharitence functions
|
||||||
*
|
*
|
||||||
* usage:
|
* usage:
|
||||||
* MySubObject=object(MyObject)
|
* MySubObject=object(MyObject)
|
||||||
*/
|
*/
|
||||||
|
@ -352,7 +373,7 @@ $(document).ready(function(){
|
||||||
fillWindow($('#rightcontent'));
|
fillWindow($('#rightcontent'));
|
||||||
});
|
});
|
||||||
$(window).trigger('resize');
|
$(window).trigger('resize');
|
||||||
|
|
||||||
if(!SVGSupport()){ //replace all svg images with png images for browser that dont support svg
|
if(!SVGSupport()){ //replace all svg images with png images for browser that dont support svg
|
||||||
replaceSVG();
|
replaceSVG();
|
||||||
}else{
|
}else{
|
||||||
|
@ -395,7 +416,7 @@ $(document).ready(function(){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 'show password' checkbox
|
// 'show password' checkbox
|
||||||
$('#pass2').showPassword();
|
$('#pass2').showPassword();
|
||||||
|
|
||||||
//use infield labels
|
//use infield labels
|
||||||
|
@ -462,15 +483,15 @@ $(document).ready(function(){
|
||||||
if (!Array.prototype.map){
|
if (!Array.prototype.map){
|
||||||
Array.prototype.map = function(fun /*, thisp */){
|
Array.prototype.map = function(fun /*, thisp */){
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
if (this === void 0 || this === null)
|
if (this === void 0 || this === null)
|
||||||
throw new TypeError();
|
throw new TypeError();
|
||||||
|
|
||||||
var t = Object(this);
|
var t = Object(this);
|
||||||
var len = t.length >>> 0;
|
var len = t.length >>> 0;
|
||||||
if (typeof fun !== "function")
|
if (typeof fun !== "function")
|
||||||
throw new TypeError();
|
throw new TypeError();
|
||||||
|
|
||||||
var res = new Array(len);
|
var res = new Array(len);
|
||||||
var thisp = arguments[1];
|
var thisp = arguments[1];
|
||||||
for (var i = 0; i < len; i++){
|
for (var i = 0; i < len; i++){
|
||||||
|
@ -478,7 +499,7 @@ if (!Array.prototype.map){
|
||||||
res[i] = fun.call(thisp, t[i], i, t);
|
res[i] = fun.call(thisp, t[i], i, t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -486,7 +507,7 @@ if (!Array.prototype.map){
|
||||||
/**
|
/**
|
||||||
* Filter Jquery selector by attribute value
|
* Filter Jquery selector by attribute value
|
||||||
**/
|
**/
|
||||||
$.fn.filterAttr = function(attr_name, attr_value) {
|
$.fn.filterAttr = function(attr_name, attr_value) {
|
||||||
return this.filter(function() { return $(this).attr(attr_name) === attr_value; });
|
return this.filter(function() { return $(this).attr(attr_name) === attr_value; });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue