diff options
Diffstat (limited to 'templates/part.addnew.php')
-rw-r--r-- | templates/part.addnew.php | 57 |
1 files changed, 41 insertions, 16 deletions
diff --git a/templates/part.addnew.php b/templates/part.addnew.php index e78c5f97f..0a167d157 100644 --- a/templates/part.addnew.php +++ b/templates/part.addnew.php @@ -1,15 +1,19 @@ <li class="add-new"> <a class="list-title list-title-with-icon" - oc-click-slide-toggle="{ - selector: '.add-new-popup', - hideOnFocusLost: true - }" href="#"> - <?php p($l->t('New'))?> + oc-click-slide-toggle="{ + selector: '.add-new-popup', + hideOnFocusLost: true, + cssClass: 'opened' + }" + href="#" + click-focus="{ + selector: '.add-new-popup input[ng-model=feedUrl]' + }"> + <?php p($l->t('Add Website'))?> </a> - <div class="add-new-popup"> + <div class="add-new-popup" > <fieldset class="personalblock"> - <legend><strong><?php p($l->t('Add Subscription')); ?></strong></legend> <p class="error"> <span ng-show="feedEmptyError"><?php p($l->t('Address must not be empty!')); ?></span> <span ng-show="feedError"> @@ -18,25 +22,46 @@ <span ng-show="folderExistsError"><?php p($l->t('Folder exists already')); ?></span> </p> <form> + <input type="text" ng-model="feedUrl" placeholder="<?php p($l->t('Address')); ?>" - ng-disabled="isAddingFeed() || isAddingFolder()"> + ng-disabled="isAddingFeed() || isAddingFolder()" + name="adress" + autofocus> <button title="<?php p($l->t('Add')); ?>" + class="primary" ng-class="{loading: isAddingFeed()}" - ng-disabled="adding" - ng-click="addFeed(feedUrl, folderId)"><?php p($l->t('Add')); ?></button> + ng-disabled="isAddingFeed() || isAddingFolder()" + ng-click="addFeed(feedUrl, folderId.id)"><?php p($l->t('Add')); ?></button> + <select name="folder" data-create="<?php p($l->t('New folder')); ?>" - title="<?php p($l->t('Folder')); ?> -" ng-model="folderId" + title="<?php p($l->t('Folder')); ?>" + ng-model="folderId" ng-disabled="isAddingFolder()" ng-options="folder.name for folder in folders" - add-folder-select - multiple="multiple"> - <option value="" selected="selected">- <?php p($l->t('Top Level')); ?></option> - <option>create</option> + ng-hide="addNewFolder"> + <option value="" selected="selected"><?php p($l->t('Choose folder')); ?></option> </select> + <button title="<?php p($l->t('Add')); ?>" + ng-click="addNewFolder=true" + ng-hide="addNewFolder"><?php p($l->t('New')); ?></button> + <input type="text" + ng-model="folderName" + ng-disabled="isAddingFolder()" + ng-show="addNewFolder" + name="foldername" + placeholder="<?php p($l->t('Folder name')); ?>" + autofocus + ui-keyup="{13: 'addFolder(folderName)'}"/> + <button title="<?php p($l->t('Add')); ?>" + ng-show="addNewFolder" + ng-click="addFolder(folderName)" + ng-disabled="isAddingFolder()" + ng-class="{loading: isAddingFolder()}"> + <?php p($l->t('Create')); ?> + </button> </form> </fieldset> </div> |