mirror of https://gitee.com/bigwinds/arangodb
Changed label of the development /production button in WI. Suggested different mode
This commit is contained in:
parent
9b592c1bd0
commit
ce28642473
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
<div class="header_left">
|
||||
<input type="button" class="open button-success" disabled="true" value="Open" />
|
||||
<input id="app-switch-mode" type="button" class="switch-mode button-warning" value="<%=app.get('development')?'Production':'Development'%>" />
|
||||
<input id="app-switch-mode" type="button" class="switch-mode button-warning" value="<%=app.get('development')?'Set Pro':'Set Dev'%>" />
|
||||
<input type="button" class="delete button-danger" value="Delete" <%=app.isSystem()?"disabled":""%> />
|
||||
</div>
|
||||
<div class="header_right">
|
||||
|
|
|
@ -36,10 +36,10 @@
|
|||
toggleDevelopment: function() {
|
||||
this.model.toggleDevelopment(!this.model.isDevelopment(), function() {
|
||||
if (this.model.isDevelopment()) {
|
||||
$("#app-switch-mode").val("Production");
|
||||
$("#app-switch-mode").val("Set Pro");
|
||||
$("#app-development-indicator").css("display", "inline");
|
||||
} else {
|
||||
$("#app-switch-mode").val("Development");
|
||||
$("#app-switch-mode").val("Set Dev");
|
||||
$("#app-development-indicator").css("display", "none");
|
||||
}
|
||||
}.bind(this));
|
||||
|
|
|
@ -354,18 +354,18 @@
|
|||
it("should switch to production if in development", function() {
|
||||
appDummy.set("development", true);
|
||||
view.render();
|
||||
expect($(switchButton).val()).toEqual("Production");
|
||||
expect($(switchButton).val()).toEqual("Set Pro");
|
||||
$(switchButton).click();
|
||||
expect($(switchButton).val()).toEqual("Development");
|
||||
expect($(switchButton).val()).toEqual("Set Dev");
|
||||
expect(appDummy.toggleDevelopment).toHaveBeenCalledWith(false, jasmine.any(Function));
|
||||
});
|
||||
|
||||
it("should switch to development if in production", function() {
|
||||
appDummy.set("development", false);
|
||||
view.render();
|
||||
expect($(switchButton).val()).toEqual("Development");
|
||||
expect($(switchButton).val()).toEqual("Set Dev");
|
||||
$(switchButton).click();
|
||||
expect($(switchButton).val()).toEqual("Production");
|
||||
expect($(switchButton).val()).toEqual("Set Pro");
|
||||
expect(appDummy.toggleDevelopment).toHaveBeenCalledWith(true, jasmine.any(Function));
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue