-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
167 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,14 @@ | ||
<h1>Home#index</h1> | ||
<p>Hello World from support_tool</p> | ||
<div id="main"> | ||
<div id="container"> | ||
<div id="menu"> | ||
<ul> | ||
<li><a href="#lists">Mailinglisten</a></li> | ||
<li><a href="#pad">Pad</a></li> | ||
</ul> | ||
</div> | ||
<div id="main"> | ||
<div class="tab tab-lists tab-active"></div> | ||
<div class="tab tab-pad">Pad administration</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,24 @@ | ||
App.Controllers.Main = Backbone.Controller.extend({ | ||
routes: { | ||
"": "index", | ||
"": "index", | ||
"lists": "lists", | ||
"pad": "pad", | ||
}, | ||
|
||
index: function() { | ||
mailingLists.fetch({ | ||
success:function(){ | ||
new App.Views.Index(); | ||
new App.Views.Lists(); | ||
} | ||
}); | ||
|
||
}, | ||
lists: function(){ | ||
console.log('set lists'); | ||
main_tabs.set('lists'); | ||
}, | ||
pad: function(){ | ||
console.log('set tabs'); | ||
main_tabs.set('pad'); | ||
} | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
<li> | ||
<a href='#documents/<%=model.id%>'><%=model.escape('name')%></a> | ||
<span class="note">melden</span><span class="notice"></span> | ||
<div> | ||
<span class="name click"><%=model.escape('name')%></span> | ||
<span class="note"> melden</span><span class="notice"></span> | ||
</div> | ||
<div class="box tab tab-<%=model.id%>"> | ||
DAS IST EIN TEST <span class="close click">x</span> | ||
<br> | ||
Administrator ändern | ||
<br> | ||
Administrator Passwort zurücksetzen | ||
<br> | ||
Moderator ändern | ||
<br> | ||
Moderator Passwort zurücksetzen | ||
<br> | ||
Liste löschen | ||
</div> | ||
</li> |
2 changes: 1 addition & 1 deletion
2
public/javascripts/app/templates/index.ejs → public/javascripts/app/templates/lists.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
App.Views.Lists = Backbone.View.extend({ | ||
initialize: function() { | ||
this.id="main"; | ||
console.log('initialize'); | ||
this.collection = mailingLists; | ||
this.template = new EJS({url: 'javascripts/app/templates/lists.ejs'}) | ||
|
||
var self = this; | ||
|
||
//this.collection.bind('add', this.addOne); | ||
this.collection.bind('refresh',function(){ self.resetAll(); }); | ||
//this.collection.bind('all', this.render) | ||
|
||
this.tabs = {}; | ||
this.render(); | ||
//console.log('init---') | ||
this.addAll(); | ||
this.tabs.panels = new Tab(this.$(".mailing-lists")); | ||
console.log('PANELS-X', this.panels); | ||
|
||
}, | ||
|
||
events: { | ||
"click .search" : "search" | ||
}, | ||
|
||
render: function() { | ||
$(this.el).html(this.template.render(this)); | ||
$('#main .tab-lists').html(this.el); | ||
}, | ||
|
||
addOne: function(list) { | ||
console.log('addOne'); | ||
var view = new App.Views.List({model: list, tabs: this.tabs}); | ||
console.log('PANELS-A', this.panels); | ||
this.$(".mailing-lists").append(view.render().el); | ||
}, | ||
|
||
addAll: function() { | ||
console.log('addAll'); | ||
var self = this; | ||
this.collection.each(function(list){ self.addOne(list); }); | ||
console.log('addAll done'); | ||
}, | ||
resetAll: function(){ | ||
console.log('resetAll'); | ||
this.$(".mailing-lists").html(''); | ||
this.addAll(); | ||
}, | ||
|
||
search: function(){ | ||
console.log('search'); | ||
this.collection.search(this.$('.searchfield')[0].value); | ||
//this.resetAll(); | ||
console.log('search done') | ||
return false; | ||
} | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,34 @@ | ||
#menu { | ||
float: left; | ||
width:300px; | ||
} | ||
|
||
#main { | ||
float: left; | ||
} | ||
|
||
.tab { | ||
display: none; | ||
} | ||
.tab.tab-active { | ||
display: block; | ||
} | ||
|
||
.list div { | ||
float: left; | ||
width: 150px; | ||
} | ||
|
||
.box { | ||
border: 1px solid #888; | ||
background-color: #EEE; | ||
border-radius:10px; | ||
padding: 5px; | ||
position:absolute; | ||
z-index: 5; | ||
margin-left:20px; | ||
} | ||
|
||
.click { | ||
cursor: pointer; | ||
} |