summaryrefslogtreecommitdiffstats
path: root/apps/files/js/detailtabview.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-07-15 16:09:00 +0200
committerArthur Schiwon <blizzz@owncloud.com>2015-08-07 01:22:42 +0200
commit12e5f310ddb784c0ed1248020b770d93040918da (patch)
tree6bfc053ff77ba25f238fef59fe3eb0c358269dc8 /apps/files/js/detailtabview.js
parent9854e71d2c83bd5f74a4798be1547e75112d5a41 (diff)
downloadnextcloud-server-12e5f310ddb784c0ed1248020b770d93040918da.tar.gz
nextcloud-server-12e5f310ddb784c0ed1248020b770d93040918da.zip
Improved right sidebar
Added owner info. Added animation, but causes scrollbal. Default file action now when clicking on name directly. Fixed icon. Added empty share tab.
Diffstat (limited to 'apps/files/js/detailtabview.js')
-rw-r--r--apps/files/js/detailtabview.js25
1 files changed, 22 insertions, 3 deletions
diff --git a/apps/files/js/detailtabview.js b/apps/files/js/detailtabview.js
index f630099111d..767ece2297c 100644
--- a/apps/files/js/detailtabview.js
+++ b/apps/files/js/detailtabview.js
@@ -17,8 +17,8 @@
* Base class for tab views to display file information.
*
*/
- var DetailTabView = function() {
- this.initialize();
+ var DetailTabView = function(id) {
+ this.initialize(id);
};
/**
@@ -51,9 +51,16 @@
/**
* Initialize the details view
+ *
+ * @param {string} id tab id
*/
- initialize: function() {
+ initialize: function(id) {
+ if (!id) {
+ throw 'Argument "id" is required';
+ }
+ this._id = id;
this.$el = $('<div class="detailTabView"></div>');
+ this.$el.attr('id', id);
},
/**
@@ -66,6 +73,15 @@
},
/**
+ * Returns the tab element id
+ *
+ * @return {string} tab id
+ */
+ getId: function() {
+ return this._id;
+ },
+
+ /**
* Returns the tab label
*
* @return {String} label
@@ -81,6 +97,9 @@
*/
render: function() {
// to be implemented in subclass
+ // FIXME: code is only for testing
+ this.$el.empty();
+ this.$el.append('<div>Hello ' + this._id + '</div>');
},
/**