diff --git a/www/drive/file.less b/www/drive/file.less index e639216c6..41896d755 100644 --- a/www/drive/file.less +++ b/www/drive/file.less @@ -497,9 +497,26 @@ span { .listElement { display: none; } + .addpad { + cursor: pointer; + opacity: 0.5; + padding: 0; + &:hover { + opacity: 0.7; + } + .fa { + cursor: pointer; + font-size: 100px; + line-height: 140px; + margin: 0; + } + } } .list { + .grid-element { + display: none; + } // Make it act as a table! padding-left: 20px; ul { diff --git a/www/drive/main.js b/www/drive/main.js index 35ed9d0d5..02bfeb91f 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -174,6 +174,7 @@ define([ var $closeIcon = $('', {"class": "fa fa-window-close"}); var $backupIcon = $('', {"class": "fa fa-life-ring"}); var $searchIcon = $('', {"class": "fa fa-search searchIcon"}); + var $addIcon = $('', {"class": "fa fa-plus"}); var history = { isHistoryMode: false, @@ -1995,6 +1996,21 @@ define([ var $element = createElement(path, key, root, false); $element.appendTo($list); }); + + var $element = $('
  • ', { + 'class': 'element-row grid-element addpad' + }).prepend($addIcon.clone()).appendTo($list); + $element.attr('title', "TODO: Add a pad"); + $element.click(function () { + window.setTimeout(function () { + $driveToolbar.find('.leftside .dropdown-bar-content').show(); + }); + /*var $content = $driveToolbar.find('.leftside .dropdown-bar-content').html(); + var $container = $('
    ').append($('
    ', {id:'cryptpad-add-pad'})); + Cryptpad.alert($container.html(),null,true); + var $c = $('body > .alertify').last().find('#cryptpad-add-pad'); + $c.append($content);*/ + }); } //$content.append($toolbar).append($title).append($info).append($dirContent); $content.append($info).append($dirContent);