1
0
Fork 0

Adjusted to new plan

This commit is contained in:
Michael Hackstein 2014-12-11 19:01:03 +01:00
parent e484afc93c
commit 027bda9ded
7 changed files with 86 additions and 49 deletions

View File

@ -5,7 +5,11 @@
<div class="contentDiv">
<div id="installed">
<div id="installedList" class="tileList"></div>
<div id="installedList" class="tileList">
<div class="tile">
<a href="#" id="addApp" class="add"><span class="pull-left icon_arangodb_roundplus arangoicon add-Icon" /> Add Application</a>
</div>
</div>
</div>
</div>
</script>

View File

@ -0,0 +1,34 @@
<script id="foxxActiveView.ejs" type="text/template">
<% var appInfos = attributes.app.split(":"); %>
<div class="iconSet">
<span class="icon_arangodb_settings2" alt="Edit application properties" title="Edit application properties"></span>
<span class="icon_arangodb_info" title="Show API documentation"></span>
</div>
<img src="foxxes/thumbnail/<%=attributes.app %>" height="50" width="50" alt="" class="icon">
<%if (attributes.development) {%>
<div class="tileBadge">
<span>
<div class="corneredBadge loaded">
development
</div>
</span>
</div>
<%} else if (attributes.active) {%>
<div class="tileBadge">
<span>
<div class="corneredBadge loaded">
active
</div>
</span>
</div>
<%} else {%>
<div class="tileBadge">
<span>
<div class="corneredBadge unloaded">
inactive
</div>
</span>
</div>
<%}%>
<h5 class="collectionName"><%= appInfos[1] %><%= attributes.isSystem && attributes.mount.charAt(0) === "/" && attributes.mount.charAt(1) === "_" ? " (system)" : "" %><%= appInfos[0] === "dev" ? " (dev)" : ""%></h5>
</script>

View File

@ -1,22 +0,0 @@
<script id="foxxInstalledView.ejs" type="text/template">
<div class="iconSet">
<span class="icon_arangodb_settings2" alt="Edit foxx properties" title="Edit foxx properties"></span>
</div>
<img src="foxxes/thumbnail/<%= attributes.app %>" height="50" width="50" alt="" class="icon">
<!-- <p class="foxxDescription">
Description: <%=attributes.description %><br />
<strong>Path:</strong>&nbsp;<%=attributes.path %><br />
<strong>Version:</strong>&nbsp;<%=attributes.version %><br />
Git: <a href=<%=attributes.git %>>Repository</a>
</p> -->
<div class="tileBadge">
<!-- <button class="button-success install">Install</button>
<% if (attributes.isSystem === false) { %>
<button class="button-danger purge">Remove</button>
<% } %>
<% if (attributes.manifest.git) { %>
<button class="button-warning update">Update</button>
<% } %> -->
</div>
<h5 class="collectionName"><%= attributes.name %><%= attributes.isSystem ? " (system)" : "" %></h5>
</script>

View File

@ -1,18 +1,4 @@
<script id="modalCollectionInfo.ejs" type="text/template">
<%
var roundNumber = function(number, n) {
var factor;
factor = Math.pow(10,n);
var returnVal = (Math.round(number * factor) / factor);
return returnVal;
};
var figuresData = content.getFigures();
var revision = content.getRevision();
var index = content.getIndex();
%>
<script id="modalApplicationMount.ejs" type="text/template">
<ul id="infoTab" class="nav nav-tabs">
<li class="active"><a href="#appstore" data-toggle="tab">App Store</a></li>
<li><a href="#github" data-toggle="tab">Github</a></li>
@ -22,6 +8,8 @@
<div class="tab-content" id="tab-content-application-info">
<div class="tab-pane active" id="appstore">
<table id="appstore-content">
</table>
</div>
<div class="tab-pane" id="github">
@ -53,10 +41,33 @@
</th>
</tr>
</table>
<button id="installGithub" class="button-success pull-right" style="margin-right:8px">Install</button>
</div>
</div>
<div class="tab-pane" id="zip">
<div>Todo how ZIP.</div>
<div>
<table>
<tr class="tableRow">
<th class="collectionInfoTh">
File*:
</th>
<th class="collectionInfoTh">
<input id="zip-file" name="zip-file" type="file"/>
</th>
</tr>
<tr class="tableRow">
<th class="collectionInfoTh">
Mount*:
</th>
<th class="collectionInfoTh">
<input type="text" id="tag" value="" placeholder="/foxx/app">
</th>
</tr>
</table>
<button id="installZip" class="button-success pull-right" style="margin-right:8px">Install</button>
</div>
</div>
</div>
</script>

View File

@ -8,13 +8,14 @@ window.ApplicationsView = Backbone.View.extend({
template: templateEngine.createTemplate("applicationsView.ejs"),
events: {
"click #checkDevel" : "toggleDevel",
"click #checkActive" : "toggleActive",
"click .checkSystem" : "toggleSystem",
"click #foxxToggle" : "slideToggle",
"click #importFoxxToggle" : "slideToggleImport",
"change #importFoxx" : "uploadSetup",
"click #confirmFoxxImport" : "importFoxx",
"click #addApp" : "createInstallModal",
"click #checkDevel" : "toggleDevel",
"click #checkActive" : "toggleActive",
"click .checkSystem" : "toggleSystem",
"click #foxxToggle" : "slideToggle",
"click #importFoxxToggle" : "slideToggleImport",
"change #importFoxx" : "uploadSetup",
"click #confirmFoxxImport" : "importFoxx",
"click #installFoxxFromGithub" : "createGithubModal",
"click .css-label" : "checkBoxes",
"change #appsDesc" : "sorting"
@ -273,7 +274,7 @@ window.ApplicationsView = Backbone.View.extend({
this._availableSubViews = {};
this._showDevel = true;
this._showActive = true;
this._showSystem = false;
this._showSystem = true;
this.reload();
},
@ -299,8 +300,6 @@ window.ApplicationsView = Backbone.View.extend({
},
renderSubViews: function () {
$("#availableList").empty();
$("#installedList").empty();
_.each(this._installedSubViews, function (v) {
$("#installedList").append(v.render());
});
@ -353,5 +352,16 @@ window.ApplicationsView = Backbone.View.extend({
$("#availableList").append(v.render());
}
});
},
createInstallModal: function(event) {
event.preventDefault();
var buttons = [];
window.modalView.show(
"modalApplicationMount.ejs",
"Pijotr",
buttons
);
}
});

View File

@ -307,7 +307,6 @@
buttons,
tableContent
);
}
});

View File

@ -44,6 +44,7 @@
"frontend/js/templates/loginView.ejs",
"frontend/js/templates/modalBase.ejs",
"frontend/js/templates/modalCollectionInfo.ejs",
"frontend/js/templates/modalApplicationMount.ejs",
"frontend/js/templates/modalGraph.ejs",
"frontend/js/templates/modalNewVersion.ejs",
"frontend/js/templates/modalTable.ejs",