diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-11-05 11:31:53 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-11-05 11:31:53 +0100 |
commit | 810dd956b4a0d08cce02fe29a93383454880ea89 (patch) | |
tree | 0dcc2c161d3a7c39b8e7b03487c2b95d7e44bade | |
parent | c8f55e7f87505d0f27df0d2115697d8456c455a1 (diff) | |
parent | 5a6cbea2619badc1c1451be2b448115a7d38be5a (diff) | |
download | nextcloud-server-810dd956b4a0d08cce02fe29a93383454880ea89.tar.gz nextcloud-server-810dd956b4a0d08cce02fe29a93383454880ea89.zip |
Merge pull request #11953 from owncloud/drop-listview-js
drop listview.js
-rw-r--r-- | core/js/listview.js | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/core/js/listview.js b/core/js/listview.js deleted file mode 100644 index 71466c90207..00000000000 --- a/core/js/listview.js +++ /dev/null @@ -1,71 +0,0 @@ -function ListView(element){ - this.element=element; -} - -ListView.generateTable=function(collumns){ - var html='<table>'; - html+='<thead>'; - $.each(collumns,function(index,collumn){ - html+='<th>'+collumn+'</th>'; - }); - html+='<thead>'; - html+='</head>'; - html+='<tbody>'; - html+='<tr class="template">'; - $.each(collumns,function(index,collumn){ - html+='<th class="'+collumn.toLower()+'"</th>'; - }); - html+='</tr>'; - html+='</tbody>'; - html='</table>'; - return $(html); -}; - -ListView.prototype={ - rows:{}, - hoverElements:{}, - addRow:function(id,data,extraData){ - var tr=this.element.find('tr.template').clone(); - tr.removeClass('template'); - $.each(data,function(name,value){ - tr.children('td.'+name).text(value); - tr.attr('data-'+name,value); - }); - $.each(extraData,function(name,value){ - tr.attr('data-'+name,value); - }); - this.rows[id]=data; - tr.data('id',id); - this.element.children('tbody').append(tr); - }, - removeRow:function(id){ - this.rows[id].remove(); - delete this.rows[id]; - }, - hoverHandeler:function(tr){ - $.each(this.hoverElement,function(index,collumn){ - $.each(collumn,function(index,element){ - var html='<a href="#" title="'+element.title+'" class="hoverElement"/>'; - element = $(html); - element.append($('<img src="'+element.icon+'"/>')); - element.click(element.callback); - tr.children('td.'+collumn).append(element); - }); - }); - if(this.deleteCallback){ - - } - }, - hoverHandelerOut:function(tr){ - tr.find('*.hoverElement').remove(); - }, - addHoverElement:function(column,icon,title,callback){ - if(!this.hoverElements[column]){ - this.hoverElements[column] = []; - } - this.hoverElements[row].push({icon:icon,callback:callback,title:title}); - }, - empty:function(){ - this.element.children('tr:not(.template)').remove(); - } -}; |