Revert "Contacts: Fix for leftcontent positioning in Android browser."
This reverts commit 93ae945414
.
This commit is contained in:
parent
e459309511
commit
f2ec68d40c
|
@ -3,6 +3,7 @@
|
||||||
}*/
|
}*/
|
||||||
#leftcontent { top: 3.5em !important; }
|
#leftcontent { top: 3.5em !important; }
|
||||||
#rightcontent { top: 3.5em !important; padding-top: 5px; }
|
#rightcontent { top: 3.5em !important; padding-top: 5px; }
|
||||||
|
#contacts { background: #fff; width: 20em; top: 3.7em; bottom:3em; position: fixed; overflow: auto; }
|
||||||
#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 0 0 #000, -3px 0 7px #000; -webkit-box-shadow: 0 0 0 #000, -3px 0 7px #000; box-shadow: 0 0 0 #000, -3px 0 7px #000;}
|
#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 0 0 #000, -3px 0 7px #000; -webkit-box-shadow: 0 0 0 #000, -3px 0 7px #000; box-shadow: 0 0 0 #000, -3px 0 7px #000;}
|
||||||
#contacts_newcontact { float: left; margin: 0.2em 0 0 1em; }
|
#contacts_newcontact { float: left; margin: 0.2em 0 0 1em; }
|
||||||
#chooseaddressbook { float: right; margin: 0.2em 1em 0 0; }
|
#chooseaddressbook { float: right; margin: 0.2em 1em 0 0; }
|
||||||
|
@ -29,8 +30,6 @@ textarea { width: 80%; min-height: 5em; min-width: 30em; margin: 0 !important; p
|
||||||
dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; }
|
dl.form { width: 100%; float: left; clear: right; margin: 0; padding: 0; }
|
||||||
.form dt { display: table-cell; clear: left; float: left; width: 7em; margin: 0; padding: 0.8em 0.5em 0 0; text-align:right; text-overflow:ellipsis; o-text-overflow: ellipsis; vertical-align: text-bottom; color: #bbb;/* white-space: pre-wrap; white-space: -moz-pre-wrap !important; white-space: -pre-wrap; white-space: -o-pre-wrap;*/ }
|
.form dt { display: table-cell; clear: left; float: left; width: 7em; margin: 0; padding: 0.8em 0.5em 0 0; text-align:right; text-overflow:ellipsis; o-text-overflow: ellipsis; vertical-align: text-bottom; color: #bbb;/* white-space: pre-wrap; white-space: -moz-pre-wrap !important; white-space: -pre-wrap; white-space: -o-pre-wrap;*/ }
|
||||||
.form dd { display: table-cell; clear: right; float: left; margin: 0; padding: 0px; white-space: nowrap; vertical-align: text-bottom; }
|
.form dd { display: table-cell; clear: right; float: left; margin: 0; padding: 0px; white-space: nowrap; vertical-align: text-bottom; }
|
||||||
.propertycontainer[data-element="EMAIL"] > input[type="email"] { min-width: 19em !important; }
|
|
||||||
.propertycontainer[data-element="TEL"] > input[type="text"] { width: 10em !important; }
|
|
||||||
#address.form dt { min-width: 5em; }
|
#address.form dt { min-width: 5em; }
|
||||||
#address.form dl { min-width: 10em; }
|
#address.form dl { min-width: 10em; }
|
||||||
.droptarget { margin: 0.5em; padding: 0.5em; border: thin solid #ccc; -moz-border-radius:.3em; -webkit-border-radius:.3em; border-radius:.3em; }
|
.droptarget { margin: 0.5em; padding: 0.5em; border: thin solid #ccc; -moz-border-radius:.3em; -webkit-border-radius:.3em; border-radius:.3em; }
|
||||||
|
@ -103,5 +102,4 @@ input[type="checkbox"] { width: 20px; height: 20px; vertical-align: bottom; }
|
||||||
.propertylist li > input[type="checkbox"],input[type="radio"] { float: left; clear: left; width: 20px; height: 20px; vertical-align: middle; }
|
.propertylist li > input[type="checkbox"],input[type="radio"] { float: left; clear: left; width: 20px; height: 20px; vertical-align: middle; }
|
||||||
.propertylist li > select { float: left; max-width: 8em; }
|
.propertylist li > select { float: left; max-width: 8em; }
|
||||||
.typelist { float: left; max-width: 10em; border: 0; background-color: #fff; } /* for multiselect */
|
.typelist { float: left; max-width: 10em; border: 0; background-color: #fff; } /* for multiselect */
|
||||||
.typelist:hover, .typelist:active { background:#fff; color:#333; border:1px solid #ddd; -moz-box-shadow:0 1px 1px #fff, 0 2px 0 #bbb outset; -webkit-box-shadow:0 1px 1px #fff, 0 1px 0 #bbb outset; box-shadow:0 1px 1px #fff, 0 1px 0 #bbb outset; -moz-border-radius:.5em; -webkit-border-radius:.5em; border-radius:.5em; outline:none; }
|
|
||||||
.addresslist { clear: both; font-weight: bold; }
|
.addresslist { clear: both; font-weight: bold; }
|
||||||
|
|
|
@ -171,7 +171,7 @@ Contacts={
|
||||||
// Make sure proper DOM is loaded.
|
// Make sure proper DOM is loaded.
|
||||||
var newid;
|
var newid;
|
||||||
if(id == undefined) {
|
if(id == undefined) {
|
||||||
newid = $('#leftcontent li:first-child').data('id');
|
newid = $('#contacts li:first-child').data('id');
|
||||||
} else {
|
} else {
|
||||||
newid = id;
|
newid = id;
|
||||||
}
|
}
|
||||||
|
@ -184,9 +184,9 @@ Contacts={
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if($('#leftcontent li').length > 0) {
|
if($('#contacts li').length > 0) {
|
||||||
//var newid = $('#leftcontent li:first-child').data('id');
|
//var newid = $('#contacts li:first-child').data('id');
|
||||||
//$('#leftcontent li:first-child').addClass('active');
|
//$('#contacts li:first-child').addClass('active');
|
||||||
$('#leftcontent li[data-id="'+newid+'"]').addClass('active');
|
$('#leftcontent li[data-id="'+newid+'"]').addClass('active');
|
||||||
$.getJSON(OC.filePath('contacts', 'ajax', 'contactdetails.php'),{'id':newid},function(jsondata){
|
$.getJSON(OC.filePath('contacts', 'ajax', 'contactdetails.php'),{'id':newid},function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
|
@ -195,7 +195,7 @@ Contacts={
|
||||||
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
|
OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if($('#leftcontent li').length == 0) {
|
} else if($('#contacts li').length == 0) {
|
||||||
// load intro page
|
// load intro page
|
||||||
$.getJSON(OC.filePath('contacts', 'ajax', 'loadintro.php'),{},function(jsondata){
|
$.getJSON(OC.filePath('contacts', 'ajax', 'loadintro.php'),{},function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
|
@ -295,7 +295,7 @@ Contacts={
|
||||||
this.id = this.fn = this.fullname = this.shortname = this.famname = this.givname = this.addname = this.honpre = this.honsuf = '';
|
this.id = this.fn = this.fullname = this.shortname = this.famname = this.givname = this.addname = this.honpre = this.honsuf = '';
|
||||||
this.data = undefined;
|
this.data = undefined;
|
||||||
// Load first in list.
|
// Load first in list.
|
||||||
if($('#leftcontent li').length > 0) {
|
if($('#contacts li').length > 0) {
|
||||||
Contacts.UI.Card.update(newid);
|
Contacts.UI.Card.update(newid);
|
||||||
} else {
|
} else {
|
||||||
// load intro page
|
// load intro page
|
||||||
|
@ -1412,7 +1412,7 @@ Contacts={
|
||||||
update:function(){
|
update:function(){
|
||||||
$.getJSON(OC.filePath('contacts', 'ajax', 'contacts.php'),{},function(jsondata){
|
$.getJSON(OC.filePath('contacts', 'ajax', 'contacts.php'),{},function(jsondata){
|
||||||
if(jsondata.status == 'success'){
|
if(jsondata.status == 'success'){
|
||||||
$('#leftcontent').html(jsondata.data.page);
|
$('#contacts').html(jsondata.data.page);
|
||||||
Contacts.UI.Card.update();
|
Contacts.UI.Card.update();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
|
@ -1423,14 +1423,14 @@ Contacts={
|
||||||
},
|
},
|
||||||
// Add thumbnails to the contact list as they become visible in the viewport.
|
// Add thumbnails to the contact list as they become visible in the viewport.
|
||||||
lazyupdate:function(){
|
lazyupdate:function(){
|
||||||
$('#leftcontent li').live('inview', function(){
|
$('#contacts li').live('inview', function(){
|
||||||
if (!$(this).find('a').attr('style')) {
|
if (!$(this).find('a').attr('style')) {
|
||||||
$(this).find('a').css('background','url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+$(this).data('id')+') no-repeat');
|
$(this).find('a').css('background','url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+$(this).data('id')+') no-repeat');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
refreshThumbnail:function(id){
|
refreshThumbnail:function(id){
|
||||||
$('#leftcontent [data-id="'+id+'"]').find('a').css('background','url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+id+'&refresh=1'+Math.random()+') no-repeat');
|
$('#contacts [data-id="'+id+'"]').find('a').css('background','url('+OC.filePath('contacts', '', 'thumbnail.php')+'?id='+id+'&refresh=1'+Math.random()+') no-repeat');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1486,7 +1486,7 @@ $(document).ready(function(){
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#leftcontent li').bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
|
$('#contacts li').bind('inview', function(event, isInView, visiblePartX, visiblePartY) {
|
||||||
if (isInView) { //NOTE: I've kept all conditions for future reference ;-)
|
if (isInView) { //NOTE: I've kept all conditions for future reference ;-)
|
||||||
// element is now visible in the viewport
|
// element is now visible in the viewport
|
||||||
if (visiblePartY == 'top') {
|
if (visiblePartY == 'top') {
|
||||||
|
@ -1525,11 +1525,11 @@ $(document).ready(function(){
|
||||||
// Name has changed. Update it and reorder.
|
// Name has changed. Update it and reorder.
|
||||||
$('#fn').live('change',function(){
|
$('#fn').live('change',function(){
|
||||||
var name = $('#fn').val();
|
var name = $('#fn').val();
|
||||||
var item = $('#leftcontent [data-id="'+Contacts.UI.Card.id+'"]').clone();
|
var item = $('#contacts [data-id="'+Contacts.UI.Card.id+'"]').clone();
|
||||||
$('#leftcontent [data-id="'+Contacts.UI.Card.id+'"]').remove();
|
$('#contacts [data-id="'+Contacts.UI.Card.id+'"]').remove();
|
||||||
$(item).find('a').html(name);
|
$(item).find('a').html(name);
|
||||||
var added = false;
|
var added = false;
|
||||||
$('#leftcontent li').each(function(){
|
$('#contacts li').each(function(){
|
||||||
if ($(this).text().toLowerCase() > name.toLowerCase()) {
|
if ($(this).text().toLowerCase() > name.toLowerCase()) {
|
||||||
$(this).before(item).fadeIn('fast');
|
$(this).before(item).fadeIn('fast');
|
||||||
added = true;
|
added = true;
|
||||||
|
|
|
@ -3,9 +3,11 @@
|
||||||
var categories = <?php echo json_encode($_['categories']); ?>;
|
var categories = <?php echo json_encode($_['categories']); ?>;
|
||||||
var lang = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(), 'core', 'lang', 'en'); ?>';
|
var lang = '<?php echo OCP\Config::getUserValue(OCP\USER::getUser(), 'core', 'lang', 'en'); ?>';
|
||||||
</script>
|
</script>
|
||||||
<ul id="leftcontent" class="leftcontent">
|
<div id="leftcontent" class="leftcontent">
|
||||||
|
<ul id="contacts">
|
||||||
<?php echo $this->inc("part.contacts"); ?>
|
<?php echo $this->inc("part.contacts"); ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
<div id="bottomcontrols">
|
<div id="bottomcontrols">
|
||||||
<form>
|
<form>
|
||||||
<button class="svg" id="contacts_newcontact" title="<?php echo $l->t('Add Contact'); ?>"><img class="svg" src="<?php echo OCP\Util::linkTo('contacts', 'img/contact-new.svg'); ?>" alt="<?php echo $l->t('Add Contact'); ?>" /></button>
|
<button class="svg" id="contacts_newcontact" title="<?php echo $l->t('Add Contact'); ?>"><img class="svg" src="<?php echo OCP\Util::linkTo('contacts', 'img/contact-new.svg'); ?>" alt="<?php echo $l->t('Add Contact'); ?>" /></button>
|
||||||
|
|
Loading…
Reference in New Issue