Skip to content

Commit

Permalink
Fix some coding inconsistencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
roncli committed Feb 2, 2015
1 parent ab083e0 commit 41cd514
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions roncli.com/admin/templates/admin/page.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="panel-body">
<div id="add-new-page" class="input-group">
<span class="input-group-addon">URL:</span>
<input id="addPageUrl" type="text" maxlength="1024" class="form-control" placeholder="/your/url/here"/>
<input id="add-page-url" type="text" maxlength="1024" class="form-control" placeholder="/your/url/here"/>
<span class="input-group-btn">
<button class="btn btn-primary" id="add-page"><span class="glyphicon glyphicon-plus"></span> Add<span class="hidden-xs"> Child Page</span></button>
</span>
Expand All @@ -34,17 +34,17 @@
<div class="panel-body">
<div class="input-group">
<span class="input-group-addon">URL:</span>
<input id="pageUrl" type="text" maxlength="1024" class="form-control" placeholder="/your/url/here" value="{{url}}"/>
<input id="page-url" type="text" maxlength="1024" class="form-control" placeholder="/your/url/here" value="{{url}}"/>
</div>
<div class="input-group">
<span class="input-group-addon">Title:</span>
<input id="pageTitle" type="text" maxlength="255" class="form-control" placeholder="Full Page Title" value="{{page.attributes.title}}"/>
<input id="page-title" type="text" maxlength="255" class="form-control" placeholder="Full Page Title" value="{{page.attributes.title}}"/>
</div>
<div class="input-group">
<span class="input-group-addon">Short Title:</span>
<input id="pageShortTitle" type="text" maxlength="255" class="form-control" placeholder="Optional Short Title" value="{{page.attributes.shortTitle}}"/>
<input id="page-short-title" type="text" maxlength="255" class="form-control" placeholder="Optional Short Title" value="{{page.attributes.shortTitle}}"/>
</div>
<div class="vertical-margin"><textarea style="width: 100%; height: 400px;" id="pageContent">{{page.attributes.content}}</textarea></div>
<div class="vertical-margin"><textarea style="width: 100%; height: 400px;" id="page-content">{{page.attributes.content}}</textarea></div>
<div class="text-center">
<button type="button" id="page-save" class="btn btn-lg btn-primary"><span class="glyphicon glyphicon-floppy-disk"></span> Save</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion roncli.com/admin/templates/admin/pages.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<div class="panel-body">
<div id="add-new-page" class="input-group">
<span class="input-group-addon">URL:</span>
<input id="addPageUrl" type="text" maxlength="1024" class="form-control" placeholder="/your/url/here"/>
<input id="add-page-url" type="text" maxlength="1024" class="form-control" placeholder="/your/url/here"/>
<span class="input-group-btn">
<button class="btn btn-primary" id="add-page"><span class="glyphicon glyphicon-plus"></span> Add<span class="hidden-xs"> Root Page</span></button>
</span>
Expand Down
16 changes: 8 additions & 8 deletions roncli.com/admin/views/admin/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ module.exports = BaseView.extend({
"click button.delete-page": "deletePage",
"click button#move-page": "movePage",
"click button#add-page": "addPage",
"keyup textarea#pageContent": "pageContentChanged",
"change textarea#pageContent": "pageContentChanged",
"keyup textarea#page-content": "pageContentChanged",
"change textarea#page-content": "pageContentChanged",
"click button#page-save": "pageSave"
},

Expand Down Expand Up @@ -166,7 +166,7 @@ module.exports = BaseView.extend({
addPage: function() {
"use strict";

var url = $("#addPageUrl").val(),
var url = $("#add-page-url").val(),
path;

if (url.length <= 1 || url.substring(0, 1) !== "/") {
Expand Down Expand Up @@ -209,7 +209,7 @@ module.exports = BaseView.extend({
if (view !== app.router.currentView) {
return;
}
$("#preview").html($("#pageContent").val());
$("#preview").html($("#page-content").val());
}, 1000);
},

Expand All @@ -219,10 +219,10 @@ module.exports = BaseView.extend({
var app = this.app,
pageId = +$("div.page").data("page-id"),
pageSave = $("#page-save"),
url = $("#pageUrl").val(),
title = $("#pageTitle").val(),
shortTitle = $("#pageShortTitle").val(),
content = $("#pageContent").val(),
url = $("#page-url").val(),
title = $("#page-title").val(),
shortTitle = $("#page-short-title").val(),
content = $("#page-content").val(),
admin = new Admin(),
adminUrl, data;

Expand Down
2 changes: 1 addition & 1 deletion roncli.com/admin/views/admin/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ module.exports = BaseView.extend({
addPage: function() {
"use strict";

var url = $("#addPageUrl").val();
var url = $("#add-page-url").val();

if (url.length <= 1 || url.substring(0, 1) !== "/") {
bootbox.dialog({
Expand Down
4 changes: 2 additions & 2 deletions roncli.com/app/templates/blog/comment.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div class="vertical-margin"><textarea class="tinymce"></textarea></div>
<button id="add-blog-comment" class="btn-lg btn-primary center-block">Add Commment</button>
<div class="text-center small">Note: All posted comments are moderated.</div>
<div id="blogCommentServerErrorList" class="panel panel-danger top-margin-only" hidden>
<div id="blog-comment-server-error-list" class="panel panel-danger top-margin-only" hidden>
<div class="panel-heading">There was an error while posting your comment:</div>
<div id="blogCommentServerErrors" class="panel-body"></div>
<div id="blog-comment-server-errors" class="panel-body"></div>
</div>
</div>
8 changes: 4 additions & 4 deletions roncli.com/app/views/blog/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ module.exports = BaseView.extend({
return;
}

$("#blogCommentServerErrors").html("");
$("#blogCommentServerErrorList").hide();
$("#blog-comment-server-errors").html("");
$("#blog-comment-server-error-list").hide();

tinyMCE.activeEditor.setContent("");
addBlogCommentButton.removeAttr("disabled");
Expand All @@ -219,7 +219,7 @@ module.exports = BaseView.extend({
}).off("shown.bs.modal").modal("show");
},
error: function(xhr, error) {
var list = $("#blogCommentServerErrorList"),
var list = $("#blog-comment-server-error-list"),
message;

console.log(xhr, error);
Expand All @@ -228,7 +228,7 @@ module.exports = BaseView.extend({
} else {
message = "There was a server error posting your comment. Please try again later.";
}
$("#blogCommentServerErrors").html(message);
$("#blog-comment-server-errors").html(message);
list.show();
addBlogCommentButton.removeAttr("disabled");
tinyMCE.activeEditor.getBody().setAttribute("contenteditable", true);
Expand Down

0 comments on commit 41cd514

Please sign in to comment.