diff --git a/Src/VideoGameQuotes.Web/Models/EditQuoteModel.cs b/Src/VideoGameQuotes.Web/Models/EditQuoteModel.cs index dd0ecb3..ddc599b 100644 --- a/Src/VideoGameQuotes.Web/Models/EditQuoteModel.cs +++ b/Src/VideoGameQuotes.Web/Models/EditQuoteModel.cs @@ -137,7 +137,7 @@ namespace VideoGameQuotes.Web.Models { return string.Empty; } - return string.Format("", editType); + return string.Format("", editType); } } } \ No newline at end of file diff --git a/Src/VideoGameQuotes.Web/VideoGameQuotes.Web.csproj b/Src/VideoGameQuotes.Web/VideoGameQuotes.Web.csproj index 61a0816..b8b3731 100644 --- a/Src/VideoGameQuotes.Web/VideoGameQuotes.Web.csproj +++ b/Src/VideoGameQuotes.Web/VideoGameQuotes.Web.csproj @@ -142,8 +142,6 @@ Always - - @@ -158,6 +156,7 @@ + diff --git a/Src/VideoGameQuotes.Web/Views/Quote/EditQuoteForm.ascx b/Src/VideoGameQuotes.Web/Views/Quote/EditQuoteForm.ascx index f6e8014..a21f031 100644 --- a/Src/VideoGameQuotes.Web/Views/Quote/EditQuoteForm.ascx +++ b/Src/VideoGameQuotes.Web/Views/Quote/EditQuoteForm.ascx @@ -11,10 +11,10 @@
<%= Html.DropDownListFor(model => model.GameId, Model.GetGameList()) %> - + <% if (Model.CurrentUser != null && Model.CurrentUser.Group >= UserGroup.Admin) { %> - - + + <% } %>

@@ -52,7 +52,7 @@

Systems

<%= Model.MakeSystemTable(Html) %> -

+

@@ -89,8 +89,8 @@ <% } %>

- Save System - Cancel + Save System + Cancel

@@ -98,7 +98,7 @@

Publishers

<%= Model.MakePublisherTable(Html) %> -

+

@@ -121,15 +121,15 @@

- Save Publisher - Cancel + Save Publisher + Cancel

- Save Game - Cancel + Save Game + Cancel

@@ -143,7 +143,7 @@

Categories

<%= Model.MakeCategoryTable(Html) %> -

+

<% if (Model.QuoteId > 0) { %> diff --git a/Src/VideoGameQuotes.Web/Views/Shared/MainMenu.ascx b/Src/VideoGameQuotes.Web/Views/Shared/MainMenu.ascx index 9d99362..3f643bd 100644 --- a/Src/VideoGameQuotes.Web/Views/Shared/MainMenu.ascx +++ b/Src/VideoGameQuotes.Web/Views/Shared/MainMenu.ascx @@ -11,5 +11,5 @@ <% } %> \ No newline at end of file diff --git a/Src/VideoGameQuotes.Web/Views/Shared/SingleQuote.ascx b/Src/VideoGameQuotes.Web/Views/Shared/SingleQuote.ascx index 2104182..5702743 100644 --- a/Src/VideoGameQuotes.Web/Views/Shared/SingleQuote.ascx +++ b/Src/VideoGameQuotes.Web/Views/Shared/SingleQuote.ascx @@ -28,10 +28,10 @@

diff --git a/Src/VideoGameQuotes.Web/Views/Shared/Site.Master b/Src/VideoGameQuotes.Web/Views/Shared/Site.Master index 5e5a853..6c0643f 100644 --- a/Src/VideoGameQuotes.Web/Views/Shared/Site.Master +++ b/Src/VideoGameQuotes.Web/Views/Shared/Site.Master @@ -8,7 +8,6 @@ - diff --git a/Src/VideoGameQuotes.Web/media/css/global.css b/Src/VideoGameQuotes.Web/media/css/global.css index c0cae87..706a7bc 100644 --- a/Src/VideoGameQuotes.Web/media/css/global.css +++ b/Src/VideoGameQuotes.Web/media/css/global.css @@ -1,6 +1,94 @@ -html { +/* reset */ +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} +body { + line-height: 1; +} +ol, ul { + list-style: none; +} +blockquote, q { + quotes: none; +} +blockquote:before, blockquote:after, +q:before, q:after { + content: ''; + content: none; +} +:focus { + outline: 0; +} +ins { + text-decoration: none; +} +del { + text-decoration: line-through; +} +table { + border-collapse: collapse; + border-spacing: 0; +} + +.clearfix:after { + visibility: hidden; + display: block; + font-size: 0; + content: " "; + clear: both; + height: 0; +} +* html .clearfix { zoom: 1; } /* IE6 */ +*:first-child+html .clearfix { zoom: 1; } /* IE7 */ + +.mir { letter-spacing : -1000em; } +/*\*/html>body .mir { letter-spacing : normal; text-indent : -999em; overflow : hidden;} + + + +/* defaults */ + +html { height: 100%; } +body { + height: 100%; +} +ul, ol { + list-style-position: outside; + margin-left: 20px; + padding: 5px; +} +ul { + list-style-type: disc; +} +ol { + list-style-type: decimal; +} +dt { + font-weight: bold; + padding: 2px; +} +dd { + margin-left: 20px; + padding: 2px; +} +/***************** end reset ***************/ + body { background-color: #EEEEEE; color: #000000; @@ -11,8 +99,9 @@ body { h1 { font-size: 5em; text-align: center; - margin-bottom: 10px; + margin: 0 auto 10px auto; padding: 5px; + width: 600px; } h2 { font-size: 3em; @@ -57,10 +146,6 @@ a.external { padding-right: 14px; } -.error-message { - padding-left: 18px; - background: transparent url(/media/images/error.png) no-repeat; -} .input-validation-error { background-color: #FFCCCC; } @@ -135,7 +220,6 @@ a.external { } - .paging-menu p { text-align: right; font-size: 80%; @@ -168,31 +252,45 @@ a.external { width: 500px; height: 120px; } -.create-new-link, .edit-link, .loading-link, .delete-link, .submit-link, .cancel-link { +#logo a, .add-icon, .edit-icon, .loading-icon, .delete-icon, .submit-icon, .cancel-icon, #search-submit, .quote-permalink, .quote-flag-icon, .error-icon { + background-image: url(/media/images/sprite.png); + background-repeat: no-repeat; +} +.add-icon, .edit-icon, .loading-icon, .delete-icon, .submit-icon, .cancel-icon, #search-submit, .quote-permalink, .quote-flag-icon, .error-icon { padding-left: 16px; margin-left: 2px; } -.create-new-link { - background: transparent url(/media/images/add.png) left center no-repeat; +.error-icon { + background-position: -128px -125px; + margin-right: 2px; } -.edit-link { - background: transparent url(/media/images/pencil.png) left center no-repeat; +.add-icon { + background-position: -64px -125px; } -.loading-link { +.edit-icon { + background-position: 0 -125px; +} +.loading-icon { background: transparent url(/media/images/loading.gif) left center no-repeat; } -.delete-link { - background: transparent url(/media/images/delete.png) left center no-repeat; +.delete-icon { + background-position: -112px -125px; } -.submit-link { - background: transparent url(/media/images/accept.png) left center no-repeat; +.submit-icon { + background-position: -96px -125px; } -.cancel-link { - background: transparent url(/media/images/cancel.png) left center no-repeat; +.cancel-icon { + background-position: -80px -125px; +} +.quote-permalink { + background-position: -32px -125px; +} +.quote-flag-icon { + background-position: -48px -125px; } .button-link { background-color: #FFFFFF; - padding: 2px 2px 2px 18px; + padding: 2px 2px 2px 0; border: 1px solid #999999 !important; color: #000000 !important; text-decoration: none; @@ -218,18 +316,14 @@ a.external { color: inherit; height: 125px; display: block; - background-image: url(/media/images/vgquotes.png); - background-position: center center; - background-repeat: no-repeat; + background-position: 0 0; } #login-dialog { padding: 10px; } -#search-submit { - cursor: pointer; -} + #wrapper { min-height: 100%; @@ -256,6 +350,10 @@ a.external { color: #000000; background-color: #EEEEEE; } +#search-submit { + background-position: -16px -125px; + cursor: pointer; +} #main { padding: 20px 20px 120px 20px; @@ -317,4 +415,109 @@ a.external { } #footer a:hover { text-decoration: underline; +} + + + +/* quote stuff */ +/* box shadow stuff from http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ */ + +.quote-container { + width: 600px; + margin: 0 auto 50px auto; + position: relative; +} + +.quote-container .quote-data .quote-score-container { + float: left; + font-family: Georgia, serif; + padding: 5px; +} +.quote-score { + cursor: help; +} +.quote-score, .vote-container { + text-align: center; +} +.vote-container { + height: 20px; +} +.quote-data { + margin-bottom: 10px; +} +.vote-for, .vote-against { + cursor: pointer; +} +.vote-for:hover, .vote-against:hover { + color: #46C46E; +} + +.quote-text { + float: left; + font-weight: bold; + font-size: 20px; +} + +.quote-score-container { + width: 40px; + font-size: 20px; +} +.quote-text { + box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; + -webkit-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; + background-color: #FFFFFF; + padding: 1.5em 1em; + width: 500px; + position: relative; +} +.quote-game-link { +} +.quote-categories a { + border: 1px solid #999999 !important; + background-color: #BBBBBB; + padding: 0 8px; + line-height: 26px; + display: block; + color: #FFFFFF !important; + position: relative; +} +.quote-categories a.game-link { + padding-left: 4px; +} +.quote-categories a.game-link img { + position: relative; + top: 3px; +} +.quote-categories a:hover { + background-color: #999999; + border: 1px solid #BBBBBB !important; +} +.quote-categories li { + float: left; + margin-right: 2px; +} + +.quote-details-created { + float: left; +} +.quote-links { + float: right; + text-align: right; + width: 100px; +} + +.flag-dialog { + width: 400px; + border: 2px ridge #000000; + background-color: #EEEEEE; +} +.flag-dialog textarea { + width: 394px; + height: 64px; +} +.flag-dialog .submit-container { + margin-top: 10px; + margin-bottom: 5px; + text-align: center; } \ No newline at end of file diff --git a/Src/VideoGameQuotes.Web/media/css/quote.css b/Src/VideoGameQuotes.Web/media/css/quote.css deleted file mode 100644 index cbcb6d1..0000000 --- a/Src/VideoGameQuotes.Web/media/css/quote.css +++ /dev/null @@ -1,111 +0,0 @@ -/* box shadow stuff from http://nicolasgallagher.com/css-drop-shadows-without-images/demo/ */ - -.quote-container { - width: 600px; - margin: 0 auto 50px auto; - position: relative; -} - -.quote-container .quote-data .quote-score-container { - float: left; - font-family: Georgia, serif; - padding: 5px; -} -.quote-score { - cursor: help; -} -.quote-score, .vote-container { - text-align: center; -} -.vote-container { - height: 20px; -} -.quote-data { - margin-bottom: 10px; -} -.vote-for, .vote-against { - cursor: pointer; -} -.vote-for:hover, .vote-against:hover { - color: #46C46E; -} - -.quote-text { - float: left; - font-weight: bold; - font-size: 20px; -} - -.quote-score-container { - width: 40px; - font-size: 20px; -} -.quote-text { - box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; - -moz-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; - -webkit-box-shadow: 0 15px 10px -10px rgba(0, 0, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset; - background-color: #FFFFFF; - padding: 1.5em 1em; - width: 500px; - position: relative; -} -.quote-game-link { -} -.quote-categories a { - border: 1px solid #999999 !important; - background-color: #BBBBBB; - padding: 0 8px; - line-height: 26px; - display: block; - color: #FFFFFF !important; - position: relative; -} -.quote-categories a.game-link { - padding-left: 4px; -} -.quote-categories a.game-link img { - position: relative; - top: 3px; -} -.quote-categories a:hover { - background-color: #999999; - border: 1px solid #BBBBBB !important; -} -.quote-categories li { - float: left; - margin-right: 2px; -} - -.quote-details-created { - float: left; -} -.quote-links { - float: right; - text-align: right; - width: 100px; -} - -.flag-dialog { - width: 400px; - border: 2px ridge #000000; - background-color: #EEEEEE; -} -.flag-dialog textarea { - width: 394px; - height: 64px; -} -.flag-dialog .submit-container { - margin-top: 10px; - margin-bottom: 5px; - text-align: center; -} -.quote-flag-link, .quote-permalink { - padding-left: 16px; - background-repeat: no-repeat; -} -.quote-flag-link { - background-image: url(/media/images/flag_red.png); -} -.quote-permalink { - background-image: url(/media/images/link.png); -} \ No newline at end of file diff --git a/Src/VideoGameQuotes.Web/media/css/reset.css b/Src/VideoGameQuotes.Web/media/css/reset.css deleted file mode 100644 index 8422fba..0000000 --- a/Src/VideoGameQuotes.Web/media/css/reset.css +++ /dev/null @@ -1,89 +0,0 @@ -html, body, div, span, applet, object, iframe, -h1, h2, h3, h4, h5, h6, p, blockquote, pre, -a, abbr, acronym, address, big, cite, code, -del, dfn, em, font, img, ins, kbd, q, s, samp, -small, strike, strong, sub, sup, tt, var, -b, u, i, center, -dl, dt, dd, ol, ul, li, -fieldset, form, label, legend, -table, caption, tbody, tfoot, thead, tr, th, td { - margin: 0; - padding: 0; - border: 0; - outline: 0; - font-size: 100%; - vertical-align: baseline; - background: transparent; -} -body { - line-height: 1; -} -ol, ul { - list-style: none; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -:focus { - outline: 0; -} -ins { - text-decoration: none; -} -del { - text-decoration: line-through; -} -table { - border-collapse: collapse; - border-spacing: 0; -} - -.clearfix:after { - visibility: hidden; - display: block; - font-size: 0; - content: " "; - clear: both; - height: 0; -} -* html .clearfix { zoom: 1; } /* IE6 */ -*:first-child+html .clearfix { zoom: 1; } /* IE7 */ - -.mir { letter-spacing : -1000em; } -/*\*/html>body .mir { letter-spacing : normal; text-indent : -999em; overflow : hidden;} - - - -/* defaults */ - -html { - height: 100%; -} -body { - height: 100%; -} -ul, ol { - list-style-position: outside; - margin-left: 20px; - padding: 5px; -} -ul { - list-style-type: disc; -} -ol { - list-style-type: decimal; -} -dt { - font-weight: bold; - padding: 2px; -} -dd { - margin-left: 20px; - padding: 2px; -} - diff --git a/Src/VideoGameQuotes.Web/media/images/sprite.png b/Src/VideoGameQuotes.Web/media/images/sprite.png new file mode 100644 index 0000000..9006846 Binary files /dev/null and b/Src/VideoGameQuotes.Web/media/images/sprite.png differ diff --git a/Src/VideoGameQuotes.Web/media/js/quoteform.js b/Src/VideoGameQuotes.Web/media/js/quoteform.js index 94495ac..b9d0efd 100644 --- a/Src/VideoGameQuotes.Web/media/js/quoteform.js +++ b/Src/VideoGameQuotes.Web/media/js/quoteform.js @@ -47,7 +47,7 @@ submitting = true; var $container = $("#create-system-form"); - var $link = $(this); + var $icon = $(this).find(".submit-icon"); var data = { SystemName: $("#SystemName").val(), SystemAbbreviation: $("#SystemAbbreviation").val(), @@ -67,7 +67,7 @@ data: data, beforeSend: function() { $container.clearModelErrors(); - $link.toggleClass("submit-link loading-link"); + $icon.toggleClass("submit-icon loading-icon"); }, success: function(data, statux, $xhr) { if (data.Error !== null) { @@ -86,7 +86,7 @@ }, complete: function() { submitting = false; - $link.toggleClass("submit-link loading-link"); + $icon.toggleClass("submit-icon loading-icon"); } }); @@ -96,12 +96,12 @@ $(".edit-system-link").click(function() { var $link = $(this); - $link.toggleClass("edit-link loading-link"); + $link.toggleClass("edit-icon loading-icon"); var systemId = $link.siblings("input[name='SystemIds']").val(); $.vgquotes.getResourceById("system", systemId, function(system) { - $link.toggleClass("edit-link loading-link"); + $link.toggleClass("edit-icon loading-icon"); if (system === null) { alert("Unable to fetch system " + systemId); @@ -124,7 +124,7 @@ $(".delete-system-link").click(function() { var $link = $(this); - $link.toggleClass("delete-link loading-link"); + $link.toggleClass("delete-icon loading-icon"); var systemId = $link.siblings("input[name='SystemIds']").val(); $.ajax("/system/delete", { @@ -139,7 +139,7 @@ //remove checkbox for that system $link.parent().empty(); }, - complete: function() { $link.toggleClass("delete-link loading-link"); } + complete: function() { $link.toggleClass("delete-icon loading-icon"); } }); return false; @@ -162,7 +162,7 @@ $("input:checked[name='SystemIds']").each(function(index, input) { if (typeof(data.SystemIds) === "undefined") { data.SystemIds = []; } data.SystemIds.push(input.value); }); $("input:checked[name='PublisherIds']").each(function(index, input) { if (typeof(data.PublisherIds) === "undefined") { data.PublisherIds = []; } data.PublisherIds.push(input.value); }); var $container = $("#create-game-form"); - var $link = $(this); + var $icon = $(this).find(".submit-icon"); var url = "/game/create"; var submittingAnEdit = $("#create-game-form > .edit-mode").val() == 1; @@ -177,7 +177,7 @@ traditional: true, beforeSend: function() { $container.clearModelErrors(); - $link.toggleClass("submit-link loading-link"); + $icon.toggleClass("submit-icon loading-icon"); }, success: function(data, status, $xhr) { if (data.Error !== null) { @@ -197,7 +197,7 @@ }, complete: function() { submitting = false; - $link.toggleClass("submit-link loading-link"); + $icon.toggleClass("submit-icon loading-icon"); } }); @@ -206,11 +206,11 @@ }()); $("#edit-game-link").click(function() { - $("#edit-game-link").toggleClass("edit-link loading-link"); + $("#edit-game-link").toggleClass("edit-icon loading-icon"); var gameId = $("#GameId").val(); $.vgquotes.getResourceById("game", gameId, function(game) { - $("#edit-game-link").toggleClass("edit-link loading-link"); + $("#edit-game-link").toggleClass("edit-icon loading-icon"); if (game === null) { alert("Unable to fetch game " + gameId); @@ -246,7 +246,7 @@ $.ajax("/game/delete", { type: "POST", data: { id: gameId }, - beforeSend: function() { $link.toggleClass("delete-link loading-link"); }, + beforeSend: function() { $link.toggleClass("delete-icon loading-icon"); }, success: function(data, status, $xhr) { if (data.Error !== null) { alert(data.Error); @@ -256,7 +256,7 @@ //remove game from the dropdown $("#GameId option[value='" + gameId + "']").remove(); }, - complete: function() { $link.toggleClass("delete-link loading-link"); } + complete: function() { $link.toggleClass("delete-icon loading-icon"); } }); return false; @@ -275,7 +275,7 @@ submitting = true; var $container = $("#create-publisher-form"); - var $link = $(this); + var $icon = $(this).find(".submit-icon"); var data = { PublisherName: $("#PublisherName").val(), PublisherWebsite: $("#PublisherWebsite").val() }; var url = "/publisher/create"; var publisherId = $container.find("> .edit-mode").val(); @@ -290,7 +290,7 @@ data: data, beforeSend: function() { $container.clearModelErrors(); - $link.toggleClass("submit-link loading-link"); + $icon.toggleClass("submit-icon loading-icon"); }, success: function(data, statux, $xhr) { if (data.Error !== null) { @@ -309,7 +309,7 @@ }, complete: function() { submitting = false; - $link.toggleClass("submit-link loading-link"); + $icon.toggleClass("submit-icon loading-icon"); } }); @@ -319,12 +319,12 @@ $(".edit-publisher-link").click(function() { var $link = $(this); - $link.toggleClass("edit-link loading-link"); + $link.toggleClass("edit-icon loading-icon"); var publisherId = $link.siblings("input[name='PublisherIds']").val(); $.vgquotes.getResourceById("publisher", publisherId, function(publisher) { - $link.toggleClass("edit-link loading-link"); + $link.toggleClass("edit-icon loading-icon"); if (publisher === null) { alert("Unable to fetch publisher " + publisherId); @@ -345,7 +345,7 @@ $(".delete-publisher-link").click(function() { var $link = $(this); - $link.toggleClass("delete-link loading-link"); + $link.toggleClass("delete-icon loading-icon"); $.ajax("/publisher/delete", { type: "POST", @@ -359,7 +359,7 @@ //remove checkbox for that publisher $link.parent().empty(); }, - complete: function() { $link.toggleClass("delete-link loading-link"); } + complete: function() { $link.toggleClass("delete-icon loading-icon"); } }); return false; @@ -384,7 +384,7 @@ $.ajax(url, { data: data, type: "POST", - beforeSend: function() { $link.toggleClass("submit-link loading-link"); }, + beforeSend: function() { $link.toggleClass("submit-icon loading-icon"); }, success: function(data, status, $xhr) { if (data.Error !== null) { alert(data.Error); @@ -413,7 +413,7 @@ } }, complete: function() { - $link.toggleClass("submit-link loading-link"); + $link.toggleClass("submit-icon loading-icon"); var $cell = $("#new-category-name").parent(); $cell .children(":visible").remove().end() @@ -425,16 +425,16 @@ }; var $table = $("#category-checkbox-table"), $cell; - var $submit = $("").attr({ href: "#", title: "submit" }).addClass("submit-link").click(submitCategory); - var $cancel = $("").attr({ href: "#", title: "cancel" }).addClass("cancel-link"); + var $submit = $("").attr({ href: "#", title: "submit" }).addClass("submit-icon").click(submitCategory); + var $cancel = $("").attr({ href: "#", title: "cancel" }).addClass("cancel-icon"); var $input = $("").attr({ id: "new-category-name", type: "text" }).bind("keyup", function(e) { console.log(e.which); if (e.which === 13) { e.preventDefault(); //make sure the parent form doesn't get submitted - submitCategory.call($(this).siblings(".submit-link").get(0)); //make sure to invoke it with the correct context + submitCategory.call($(this).siblings(".submit-icon").get(0)); //make sure to invoke it with the correct context } else if (e.which === 27) { e.preventDefault(); - //$cancel.onclick.call($(this).siblings(".cancel-link").get(0)); + //$cancel.onclick.call($(this).siblings(".cancel-icon").get(0)); $cancel.click(); } }); @@ -490,7 +490,7 @@ $.ajax("/category/delete", { type: "POST", data: { id: categoryId }, - beforeSend: function() { $link.toggleClass("delete-link loading-link"); }, + beforeSend: function() { $link.toggleClass("delete-icon loading-icon"); }, success: function(data) { if (data.Error !== null) { alert(data.Error); @@ -500,7 +500,7 @@ //remove checkbox $("#category-checkbox-table").find("input[value='" + categoryId + "']").parent().empty(); }, - complete: function() { $link.toggleClass("delete-link loading-link"); } + complete: function() { $link.toggleClass("delete-icon loading-icon"); } }); return false; diff --git a/Src/VideoGameQuotes.Web/media/js/vgquotes.js b/Src/VideoGameQuotes.Web/media/js/vgquotes.js index a81e835..dd629b2 100644 --- a/Src/VideoGameQuotes.Web/media/js/vgquotes.js +++ b/Src/VideoGameQuotes.Web/media/js/vgquotes.js @@ -26,8 +26,9 @@ } $("") - .addClass("field-validation-error error-message") - .text(value) + .addClass("field-validation-error") + .append($("").addClass("error-icon")) + .append($("").text(value)) .insertAfter($input); } }); @@ -209,13 +210,12 @@ }; var setupFlagLink = function() { - $("a.quote-flag-link").click(function() { + $("a.quote-flag-icon").click(function() { if ($(".flag-dialog").length > 0) { return false; } - var $link = $(this); - var $container = $link.parents(".quote-container"); + var $container = $(this).parents(".quote-container"); var quoteId = $container.find("input.quote-id").val(); var $row = $(""); @@ -232,11 +232,12 @@ var $submit = $("") .attr({ href: "#", title: "submit" }) - .addClass("submit-link button-link") - .text("Submit") + .addClass("button-link") + .append($("").addClass("submit-icon")) + .append($("").text("Submit")) .click(function() { - var $link = $(this); - $link.toggleClass("submit-link loading-link"); + var $icon = $(this).find(".submit-icon"); + $icon.toggleClass("submit-icon loading-icon"); $.ajax("/flag", { type: "POST", @@ -250,7 +251,7 @@ $.vgquotes.closeDialog($dialog); }, - complete: function() { $link.toggleClass("submit-link loading-link"); } + complete: function() { $icon.toggleClass("submit-icon loading-icon"); } }); return false; @@ -258,8 +259,9 @@ var $cancel = $("") .attr({ href: "#", title: "cancel" }) - .addClass("cancel-link button-link") - .text("Cancel") + .addClass("button-link") + .append($("").addClass("cancel-icon")) + .append($("").text("Cancel")) .click(function() { $.vgquotes.closeDialog($dialog); return false; }); $dialog