aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-06-25 17:59:49 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-06-25 18:24:15 +0200
commitb8d6ad0431b33c56ea1fceba0845eecb4ef6ca0f (patch)
tree9dc2258f713a626f75817442ca7ad57a3628b908
parent380f41136cf705de2df5101e42d89c9483e2c078 (diff)
downloadnextcloud-server-b8d6ad0431b33c56ea1fceba0845eecb4ef6ca0f.tar.gz
nextcloud-server-b8d6ad0431b33c56ea1fceba0845eecb4ef6ca0f.zip
Improve styling on draggables.
-rw-r--r--apps/contacts/css/contacts.css1
-rw-r--r--apps/contacts/js/contacts.js14
2 files changed, 9 insertions, 6 deletions
diff --git a/apps/contacts/css/contacts.css b/apps/contacts/css/contacts.css
index fb5bcb2b70c..f60d9bfe677 100644
--- a/apps/contacts/css/contacts.css
+++ b/apps/contacts/css/contacts.css
@@ -8,6 +8,7 @@
#leftcontent h3:hover,#leftcontent h3:active,#leftcontent h3.active { background-color: #DBDBDB; border-bottom: 1px solid #CCCCCC; border-top: 1px solid #D4D4D4; color: #333333; }
#contacts { position: fixed; background: #fff; max-width: 100%; width: 20em; left: 12.5em; top: 3.7em; bottom: 3em; overflow: auto; padding: 0; margin: 0; }
.contacts a { height: 23px; display: block; left: 12.5em; margin: 0 0 0 0; padding: 0 0 0 25px; }
+.contacts li.ui-draggable { height: 23px; width: 20em; }
#bottomcontrols { padding: 0; bottom:0px; height:2.8em; width: 20em; margin:0; background:#eee; border-top:1px solid #ccc; position:fixed; -moz-box-shadow: 0 -3px 3px -3px #000; -webkit-box-shadow: 0 -3px 3px -3px #000; box-shadow: 0 -3px 3px -3px #000;}
#contacts_newcontact { float: left; margin: 0.2em 0 0 1em; }
#chooseaddressbook { float: right; margin: 0.2em 1em 0 0; }
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index d5f09fbc722..12c6d98f20b 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -1550,14 +1550,16 @@ Contacts={
}
})}, 100);
setTimeout(Contacts.UI.Contacts.lazyupdate, 500);*/
+ if($('#contacts h3').length > 1) {
+ $('#contacts h3,#contacts ul').droppable({ drop: Contacts.UI.Contacts.drop});
+ $('#contacts li').draggable({
+ axis: 'y', containment: '#contacts',
+ scroll: true, scrollSensitivity: 100,
+ opacity: 0.7, helper: 'clone'
+ });
+ }
});
Contacts.UI.Card.update(id);
- $('#contacts h3,#contacts ul').droppable({ drop: Contacts.UI.Contacts.drop});
- $('#contacts li').draggable({
- axis: 'y', containment: '#contacts',
- scroll: true, scrollSensitivity: 100,
- opacity: 0.7, helper: 'clone'
- });
}
else{
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));