diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-28 14:54:10 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-02-28 14:54:10 +0100 |
commit | 15d1df055b093ecce0c5ae52561dd73584145c7c (patch) | |
tree | 4f2b10bacfa5371e3f2a53122a3165bf94114d01 /core/js/js.js | |
parent | 65843e245996c9ecfd167be2b520bb917b32aa7e (diff) | |
parent | dd32091016481b0b6845e03ea87ce419b3cda19e (diff) | |
download | nextcloud-server-15d1df055b093ecce0c5ae52561dd73584145c7c.tar.gz nextcloud-server-15d1df055b093ecce0c5ae52561dd73584145c7c.zip |
Merge branch 'master' into display-share-owner-master
Conflicts:
apps/files_sharing/lib/cache.php
Diffstat (limited to 'core/js/js.js')
-rw-r--r-- | core/js/js.js | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/core/js/js.js b/core/js/js.js index d4d2583f1e5..21ccee0f1d5 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -467,6 +467,34 @@ OC.search.lastResults={}; OC.addStyle.loaded=[]; OC.addScript.loaded=[]; +OC.msg={ + startSaving:function(selector){ + OC.msg.startAction(selector, t('core', 'Saving...')); + }, + finishedSaving:function(selector, data){ + OC.msg.finishedAction(selector, data); + }, + startAction:function(selector, message){ + $(selector) + .html( message ) + .removeClass('success') + .removeClass('error') + .stop(true, true) + .show(); + }, + finishedAction:function(selector, data){ + if( data.status === "success" ){ + $(selector).html( data.data.message ) + .addClass('success') + .stop(true, true) + .delay(3000) + .fadeOut(900); + }else{ + $(selector).html( data.data.message ).addClass('error'); + } + } +}; + OC.Notification={ queuedNotifications: [], getDefaultNotificationFunction: null, @@ -860,6 +888,7 @@ function initCore() { // checkShowCredentials(); // $('input#user, input#password').keyup(checkShowCredentials); + // user menu $('#settings #expand').keydown(function(event) { if (event.which === 13 || event.which === 32) { $('#expand').click() @@ -872,7 +901,8 @@ function initCore() { $('#settings #expanddiv').click(function(event){ event.stopPropagation(); }); - $(document).click(function(){//hide the settings menu when clicking outside it + //hide the user menu when clicking outside it + $(document).click(function(){ $('#settings #expanddiv').slideUp(200); }); @@ -987,6 +1017,17 @@ OC.set=function(name, value) { context[tail]=value; }; +// fix device width on windows phone +(function() { + if ("-ms-user-select" in document.documentElement.style && navigator.userAgent.match(/IEMobile\/10\.0/)) { + var msViewportStyle = document.createElement("style"); + msViewportStyle.appendChild( + document.createTextNode("@-ms-viewport{width:auto!important}") + ); + document.getElementsByTagName("head")[0].appendChild(msViewportStyle); + } +})(); + /** * select a range in an input field * @link http://stackoverflow.com/questions/499126/jquery-set-cursor-position-in-text-area |