]> source.dussan.org Git - nextcloud-server.git/commitdiff
Updated bookmark form
authorMarvin Thomas Rabe <m.rabe@echtzeitraum.de>
Wed, 22 Feb 2012 22:22:17 +0000 (23:22 +0100)
committerMarvin Thomas Rabe <m.rabe@echtzeitraum.de>
Wed, 22 Feb 2012 22:22:17 +0000 (23:22 +0100)
apps/bookmarks/css/bookmarks.css
apps/bookmarks/js/bookmarks.js
apps/bookmarks/templates/list.php
settings/templates/users.php

index fedd2af7c4c0b112bdf086fbb2d6760253aad2c5..12ccf938b55ce459ddb105650eb10ce80159386b 100644 (file)
        padding: 0.5ex;
 }
 
-.bookmarks_add {
-       display: none;
-       margin-top: 45px;
-}
-
 .bookmarks_list {
        margin-top: 36px;
 }
@@ -35,7 +30,7 @@
 }
 
 .bookmarks_input {
-       width: 20em;
+       width: 8em;
 }
 
 .bookmark_actions {
index 6db0969a2bbb85cec96170537901630f33c706b4..166024eabde156a9f80501c2246b3d491b63b310 100644 (file)
@@ -3,11 +3,7 @@ var bookmarks_loading = false;
 
 var bookmarks_sorting = 'bookmarks_sorting_recent';
 
-$(document).ready(function() {
-       $('.bookmarks_addBtn').click(function(event){
-               $('.bookmarks_add').slideToggle();
-       });
-       
+$(document).ready(function() { 
        $('#bookmark_add_submit').click(addOrEditBookmark);
        $(window).scroll(updateOnBottom);
        
@@ -55,21 +51,14 @@ function addOrEditBookmark(event) {
        var title = encodeEntities($('#bookmark_add_title').val());
        var tags = encodeEntities($('#bookmark_add_tags').val());
        var taglist = tags.split(' ');
-       var tagshtml = '';
        $("#firstrun").hide();
-
-       for ( var i=0, len=taglist.length; i<len; ++i ){
-               tagshtml += '<a class="bookmark_tag" href="?tag=' + encodeURI(taglist[i]) + '">' + taglist[i] + '</a> ';
-       }
        
        if (id == 0) {
                $.ajax({
                        url: 'ajax/addBookmark.php',
                        data: 'url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&tags=' + encodeURI(tags),
                        success: function(response){ 
-                               var bookmark_id = response.data;
-                               $('.bookmarks_add').slideToggle(); 
-                               $('.bookmarks_add').children('p').children('.bookmarks_input').val(''); 
+                               $('.bookmarks_input').val(''); 
                                $('.bookmarks_list').empty();
                                bookmarks_page = 0;
                                getBookmarks();
@@ -81,8 +70,7 @@ function addOrEditBookmark(event) {
                        url: 'ajax/editBookmark.php',
                        data: 'id=' + id + '&url=' + encodeURI(url) + '&title=' + encodeURI(title) + '&tags=' + encodeURI(tags),
                        success: function(){ 
-                               $('.bookmarks_add').slideToggle(); 
-                               $('.bookmarks_add').children('p').children('.bookmarks_input').val(''); 
+                               $('.bookmarks_input').val('');
                                $('#bookmark_add_id').val('0');
                                $('.bookmarks_list').empty();
                                bookmarks_page = 0;
index 46577d1683209efb5de5a8f571242a6902905943..b3849069feebd7e074f41389c2535b1c897f67f8 100644 (file)
@@ -9,16 +9,11 @@
 ?>
 <input type="hidden" id="bookmarkFilterTag" value="<?php if(isset($_GET['tag'])) echo htmlentities($_GET['tag']); ?>" />
 <div id="controls">
-       <input type="button" class="bookmarks_addBtn" value="<?php echo $l->t('Add bookmark'); ?>"/>
-</div>
-<div class="bookmarks_add">
        <input type="hidden" id="bookmark_add_id" value="0" />
-       <p><label class="bookmarks_label"><?php echo $l->t('Address'); ?></label><input type="text" id="bookmark_add_url" class="bookmarks_input" /></p>
-       <p><label class="bookmarks_label"><?php echo $l->t('Title'); ?></label><input type="text" id="bookmark_add_title" class="bookmarks_input" />
-       <img class="loading_meta" src="<?php echo OC_Helper::imagePath('core', 'loading.gif'); ?>" /></p>
-       <p><label class="bookmarks_label"><?php echo $l->t('Tags'); ?></label><input type="text" id="bookmark_add_tags" class="bookmarks_input" /></p>
-       <p><label class="bookmarks_label"> </label><label class="bookmarks_hint"><?php echo $l->t('Hint: Use space to separate tags.'); ?></label></p>
-       <p><label class="bookmarks_label"></label><input type="submit" value="<?php echo $l->t('Add bookmark'); ?>" id="bookmark_add_submit" /></p>
+       <input type="text" id="bookmark_add_url" placeholder="<?php echo $l->t('Address'); ?>" class="bookmarks_input" />
+       <input type="text" id="bookmark_add_title" placeholder="<?php echo $l->t('Title'); ?>" class="bookmarks_input" />
+       <input type="text" id="bookmark_add_tags" placeholder="<?php echo $l->t('Tags'); ?>" class="bookmarks_input" />
+       <input type="submit" value="<?php echo $l->t('Add bookmark'); ?>" id="bookmark_add_submit" />
 </div>
 <div class="bookmarks_list">
 </div>
index bcc4d65fe43280f7dca577f31cede21b5c0d9e4d..fde4cfb9aed01846c3a4e3791bb90f697475aaec 100644 (file)
@@ -12,15 +12,14 @@ foreach($_["groups"] as $group) {
 
 <div id="controls">
        <form id="newuser">
-               <th class="name"><input id="newusername" placeholder="<?php echo $l->t('Name')?>" /></th>
-               <th class="password"><input type="password" id="newuserpassword" placeholder="<?php echo $l->t('Password')?>" /></th>
-               <th class="groups"><select id="newusergroups" data-placeholder="groups" title="<?php echo $l->t('Groups')?>" multiple="multiple">
+               <input id="newusername" placeholder="<?php echo $l->t('Name')?>" />
+               <input type="password" id="newuserpassword" placeholder="<?php echo $l->t('Password')?>" />
+               <select id="newusergroups" data-placeholder="groups" title="<?php echo $l->t('Groups')?>" multiple="multiple">
                <?php foreach($_["groups"] as $group): ?>
                        <option value="<?php echo $group['name'];?>"><?php echo $group['name'];?></option>
                <?php endforeach;?>
-               </select></th>
-               <th class="quota"></th>
-               <th><input type="submit" value="<?php echo $l->t('Create')?>" /></th>
+               </select>
+               <input type="submit" value="<?php echo $l->t('Create')?>" />
        </form>
 </div>