Popup for app specific settings.

This commit is contained in:
Thomas Tanghus 2012-07-31 12:21:06 +02:00
parent 8a92cd21d6
commit 553773f2e1
2 changed files with 48 additions and 16 deletions

View File

@ -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:hover, li:active { background:#eee; }
#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); }

View File

@ -155,6 +155,27 @@ OC={
var date = new Date(1000*mtime);
var ret = date.getDate()+'.'+(date.getMonth()+1)+'.'+date.getFullYear()+', '+date.getHours()+':'+date.getMinutes();
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={};