From 129e07e2315ea10fe8bf26aa99d1700b845f3776 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Sat, 29 Nov 2014 13:36:41 -0800 Subject: [PATCH 1/5] Refactored a bunch of editor stuff to be included in the wads. Fixed a bug with the I18NEditModelView. --- app/styles/modal/{auth.sass => auth-modal.sass} | 0 app/styles/modal/{model.sass => model-modal.sass} | 0 app/styles/modal/{recover.sass => recover-modal.sass} | 0 app/styles/modal/{revert.sass => revert-modal.sass} | 0 .../modal/{save_version.sass => save-version-modal.sass} | 0 app/templates/common/{search.jade => search-view.jade} | 0 .../{ => editor}/docs/components-documentation-view.jade | 0 .../{ => editor}/docs/systems-documentation-view.jade | 0 app/templates/editor/level/modal/new-achievement.jade | 2 +- app/templates/editor/level/save.jade | 2 +- .../{modal/confirm.jade => editor/modal/confirm-modal.jade} | 0 .../new_model.jade => editor/modal/new-model-modal.jade} | 0 .../modal/save-version-modal.jade} | 0 .../versions.jade => editor/modal/versions-modal.jade} | 2 +- app/templates/modal/{revert.jade => revert-modal.jade} | 0 app/views/common/SearchView.coffee | 4 ++-- app/views/editor/achievement/AchievementEditView.coffee | 2 +- app/views/editor/article/ArticleEditView.coffee | 2 +- app/views/editor/article/ArticleVersionsModal.coffee | 2 +- app/views/editor/component/ComponentVersionsModal.coffee | 2 +- .../{ => editor}/docs/ComponentsDocumentationView.coffee | 2 +- app/views/{ => editor}/docs/SystemsDocumentationView.coffee | 2 +- app/views/editor/level/LevelEditView.coffee | 6 +++--- .../editor/level/components/LevelComponentEditView.coffee | 2 +- app/views/editor/level/modals/LevelVersionsModal.coffee | 2 +- app/views/editor/level/modals/NewAchievementModal.coffee | 2 +- app/views/editor/level/modals/SaveLevelModal.coffee | 2 +- app/views/editor/level/systems/LevelSystemEditView.coffee | 2 +- app/views/editor/level/systems/SystemVersionsModal.coffee | 2 +- app/views/{ => editor}/modal/ConfirmModal.coffee | 4 ++-- app/views/{ => editor}/modal/NewModelModal.coffee | 2 +- app/views/{ => editor}/modal/SaveVersionModal.coffee | 2 +- app/views/{ => editor}/modal/VersionsModal.coffee | 2 +- app/views/editor/thang/ThangTypeEditView.coffee | 2 +- app/views/editor/thang/ThangTypeVersionsModal.coffee | 2 +- app/views/i18n/I18NEditModelView.coffee | 2 +- app/views/modal/RevertModal.coffee | 2 +- config.coffee | 2 ++ 38 files changed, 31 insertions(+), 29 deletions(-) rename app/styles/modal/{auth.sass => auth-modal.sass} (100%) rename app/styles/modal/{model.sass => model-modal.sass} (100%) rename app/styles/modal/{recover.sass => recover-modal.sass} (100%) rename app/styles/modal/{revert.sass => revert-modal.sass} (100%) rename app/styles/modal/{save_version.sass => save-version-modal.sass} (100%) rename app/templates/common/{search.jade => search-view.jade} (100%) rename app/templates/{ => editor}/docs/components-documentation-view.jade (100%) rename app/templates/{ => editor}/docs/systems-documentation-view.jade (100%) rename app/templates/{modal/confirm.jade => editor/modal/confirm-modal.jade} (100%) rename app/templates/{modal/new_model.jade => editor/modal/new-model-modal.jade} (100%) rename app/templates/{modal/save_version.jade => editor/modal/save-version-modal.jade} (100%) rename app/templates/{modal/versions.jade => editor/modal/versions-modal.jade} (88%) rename app/templates/modal/{revert.jade => revert-modal.jade} (100%) rename app/views/{ => editor}/docs/ComponentsDocumentationView.coffee (95%) rename app/views/{ => editor}/docs/SystemsDocumentationView.coffee (94%) rename app/views/{ => editor}/modal/ConfirmModal.coffee (83%) rename app/views/{ => editor}/modal/NewModelModal.coffee (96%) rename app/views/{ => editor}/modal/SaveVersionModal.coffee (97%) rename app/views/{ => editor}/modal/VersionsModal.coffee (97%) diff --git a/app/styles/modal/auth.sass b/app/styles/modal/auth-modal.sass similarity index 100% rename from app/styles/modal/auth.sass rename to app/styles/modal/auth-modal.sass diff --git a/app/styles/modal/model.sass b/app/styles/modal/model-modal.sass similarity index 100% rename from app/styles/modal/model.sass rename to app/styles/modal/model-modal.sass diff --git a/app/styles/modal/recover.sass b/app/styles/modal/recover-modal.sass similarity index 100% rename from app/styles/modal/recover.sass rename to app/styles/modal/recover-modal.sass diff --git a/app/styles/modal/revert.sass b/app/styles/modal/revert-modal.sass similarity index 100% rename from app/styles/modal/revert.sass rename to app/styles/modal/revert-modal.sass diff --git a/app/styles/modal/save_version.sass b/app/styles/modal/save-version-modal.sass similarity index 100% rename from app/styles/modal/save_version.sass rename to app/styles/modal/save-version-modal.sass diff --git a/app/templates/common/search.jade b/app/templates/common/search-view.jade similarity index 100% rename from app/templates/common/search.jade rename to app/templates/common/search-view.jade diff --git a/app/templates/docs/components-documentation-view.jade b/app/templates/editor/docs/components-documentation-view.jade similarity index 100% rename from app/templates/docs/components-documentation-view.jade rename to app/templates/editor/docs/components-documentation-view.jade diff --git a/app/templates/docs/systems-documentation-view.jade b/app/templates/editor/docs/systems-documentation-view.jade similarity index 100% rename from app/templates/docs/systems-documentation-view.jade rename to app/templates/editor/docs/systems-documentation-view.jade diff --git a/app/templates/editor/level/modal/new-achievement.jade b/app/templates/editor/level/modal/new-achievement.jade index fef533444..3c083e204 100644 --- a/app/templates/editor/level/modal/new-achievement.jade +++ b/app/templates/editor/level/modal/new-achievement.jade @@ -1,4 +1,4 @@ -extends /templates/modal/new_model +extends /templates/editor/modal/new-model-modal block modal-body-content form.form diff --git a/app/templates/editor/level/save.jade b/app/templates/editor/level/save.jade index ae119168a..ddc03b4c4 100644 --- a/app/templates/editor/level/save.jade +++ b/app/templates/editor/level/save.jade @@ -1,4 +1,4 @@ -extends /templates/modal/save_version +extends /templates/editor/modal/save-version-modal block modal-body-content h3= "Level: " + level.get('name') + " - " + (levelNeedsSave ? "Modified" : "Not Modified") diff --git a/app/templates/modal/confirm.jade b/app/templates/editor/modal/confirm-modal.jade similarity index 100% rename from app/templates/modal/confirm.jade rename to app/templates/editor/modal/confirm-modal.jade diff --git a/app/templates/modal/new_model.jade b/app/templates/editor/modal/new-model-modal.jade similarity index 100% rename from app/templates/modal/new_model.jade rename to app/templates/editor/modal/new-model-modal.jade diff --git a/app/templates/modal/save_version.jade b/app/templates/editor/modal/save-version-modal.jade similarity index 100% rename from app/templates/modal/save_version.jade rename to app/templates/editor/modal/save-version-modal.jade diff --git a/app/templates/modal/versions.jade b/app/templates/editor/modal/versions-modal.jade similarity index 88% rename from app/templates/modal/versions.jade rename to app/templates/editor/modal/versions-modal.jade index 7c9f7cc5c..a8a931477 100755 --- a/app/templates/modal/versions.jade +++ b/app/templates/editor/modal/versions-modal.jade @@ -25,7 +25,7 @@ block modal-body-content td input(type="checkbox", value=data._id).select td - a(href="/editor/#{page}/#{data._id}") #{data.version.major}.#{data.version.minor} + a(href="/editor#{page}/#{data._id}") #{data.version.major}.#{data.version.minor} td= moment(data.created).format('l') td= data.creator td #{data.commitMessage} diff --git a/app/templates/modal/revert.jade b/app/templates/modal/revert-modal.jade similarity index 100% rename from app/templates/modal/revert.jade rename to app/templates/modal/revert-modal.jade diff --git a/app/views/common/SearchView.coffee b/app/views/common/SearchView.coffee index cf8ffbbeb..e4ff9d179 100644 --- a/app/views/common/SearchView.coffee +++ b/app/views/common/SearchView.coffee @@ -1,6 +1,6 @@ RootView = require 'views/core/RootView' -NewModelModal = require 'views/modal/NewModelModal' -template = require 'templates/common/search' +NewModelModal = require 'views/editor/modal/NewModelModal' +template = require 'templates/common/search-view' app = require 'core/application' class SearchCollection extends Backbone.Collection diff --git a/app/views/editor/achievement/AchievementEditView.coffee b/app/views/editor/achievement/AchievementEditView.coffee index ffdb15549..0d5011d14 100644 --- a/app/views/editor/achievement/AchievementEditView.coffee +++ b/app/views/editor/achievement/AchievementEditView.coffee @@ -2,7 +2,7 @@ RootView = require 'views/core/RootView' template = require 'templates/editor/achievement/edit' Achievement = require 'models/Achievement' AchievementPopup = require 'views/core/AchievementPopup' -ConfirmModal = require 'views/modal/ConfirmModal' +ConfirmModal = require 'views/editor/modal/ConfirmModal' errors = require 'core/errors' app = require 'core/application' nodes = require 'views/editor/level/treema_nodes' diff --git a/app/views/editor/article/ArticleEditView.coffee b/app/views/editor/article/ArticleEditView.coffee index 00902228c..f808b5a01 100644 --- a/app/views/editor/article/ArticleEditView.coffee +++ b/app/views/editor/article/ArticleEditView.coffee @@ -2,7 +2,7 @@ RootView = require 'views/core/RootView' VersionHistoryView = require './ArticleVersionsModal' template = require 'templates/editor/article/edit' Article = require 'models/Article' -SaveVersionModal = require 'views/modal/SaveVersionModal' +SaveVersionModal = require 'views/editor/modal/SaveVersionModal' PatchesView = require 'views/editor/PatchesView' require 'views/modal/RevertModal' diff --git a/app/views/editor/article/ArticleVersionsModal.coffee b/app/views/editor/article/ArticleVersionsModal.coffee index 10027ad99..fb3377f8e 100644 --- a/app/views/editor/article/ArticleVersionsModal.coffee +++ b/app/views/editor/article/ArticleVersionsModal.coffee @@ -1,4 +1,4 @@ -VersionsModal = require 'views/modal/VersionsModal' +VersionsModal = require 'views/editor/modal/VersionsModal' module.exports = class ArticleVersionsModal extends VersionsModal id: 'editor-article-versions-view' diff --git a/app/views/editor/component/ComponentVersionsModal.coffee b/app/views/editor/component/ComponentVersionsModal.coffee index fb027826e..bdcc29eea 100755 --- a/app/views/editor/component/ComponentVersionsModal.coffee +++ b/app/views/editor/component/ComponentVersionsModal.coffee @@ -1,4 +1,4 @@ -VersionsModal = require 'views/modal/VersionsModal' +VersionsModal = require 'views/editor/modal/VersionsModal' module.exports = class ComponentVersionsModal extends VersionsModal id: 'editor-component-versions-view' diff --git a/app/views/docs/ComponentsDocumentationView.coffee b/app/views/editor/docs/ComponentsDocumentationView.coffee similarity index 95% rename from app/views/docs/ComponentsDocumentationView.coffee rename to app/views/editor/docs/ComponentsDocumentationView.coffee index 15c2661cd..c74ec3147 100644 --- a/app/views/docs/ComponentsDocumentationView.coffee +++ b/app/views/editor/docs/ComponentsDocumentationView.coffee @@ -1,5 +1,5 @@ CocoView = require 'views/core/CocoView' -template = require 'templates/docs/components-documentation-view' +template = require 'templates/editor/docs/components-documentation-view' CocoCollection = require 'collections/CocoCollection' LevelComponent = require 'models/LevelComponent' diff --git a/app/views/docs/SystemsDocumentationView.coffee b/app/views/editor/docs/SystemsDocumentationView.coffee similarity index 94% rename from app/views/docs/SystemsDocumentationView.coffee rename to app/views/editor/docs/SystemsDocumentationView.coffee index bc0df08ec..4489832fb 100644 --- a/app/views/docs/SystemsDocumentationView.coffee +++ b/app/views/editor/docs/SystemsDocumentationView.coffee @@ -1,5 +1,5 @@ CocoView = require 'views/core/CocoView' -template = require 'templates/docs/systems-documentation-view' +template = require 'templates/editor/docs/systems-documentation-view' CocoCollection = require 'collections/CocoCollection' LevelSystem = require 'models/LevelSystem' diff --git a/app/views/editor/level/LevelEditView.coffee b/app/views/editor/level/LevelEditView.coffee index a50a66bfb..7b848fe13 100644 --- a/app/views/editor/level/LevelEditView.coffee +++ b/app/views/editor/level/LevelEditView.coffee @@ -17,12 +17,12 @@ ComponentsTabView = require './components/ComponentsTabView' SystemsTabView = require './systems/SystemsTabView' SaveLevelModal = require './modals/SaveLevelModal' ForkModal = require 'views/editor/ForkModal' -SaveVersionModal = require 'views/modal/SaveVersionModal' +SaveVersionModal = require 'views/editor/modal/SaveVersionModal' PatchesView = require 'views/editor/PatchesView' RelatedAchievementsView = require 'views/editor/level/RelatedAchievementsView' VersionHistoryView = require './modals/LevelVersionsModal' -ComponentsDocumentationView = require 'views/docs/ComponentsDocumentationView' -SystemsDocumentationView = require 'views/docs/SystemsDocumentationView' +ComponentsDocumentationView = require 'views/editor/docs/ComponentsDocumentationView' +SystemsDocumentationView = require 'views/editor/docs/SystemsDocumentationView' LevelFeedbackView = require 'views/editor/level/LevelFeedbackView' storage = require 'core/storage' diff --git a/app/views/editor/level/components/LevelComponentEditView.coffee b/app/views/editor/level/components/LevelComponentEditView.coffee index 39440d767..fab0f5fc4 100644 --- a/app/views/editor/level/components/LevelComponentEditView.coffee +++ b/app/views/editor/level/components/LevelComponentEditView.coffee @@ -3,7 +3,7 @@ template = require 'templates/editor/level/component/level-component-edit-view' LevelComponent = require 'models/LevelComponent' ComponentVersionsModal = require 'views/editor/component/ComponentVersionsModal' PatchesView = require 'views/editor/PatchesView' -SaveVersionModal = require 'views/modal/SaveVersionModal' +SaveVersionModal = require 'views/editor/modal/SaveVersionModal' module.exports = class LevelComponentEditView extends CocoView id: 'level-component-edit-view' diff --git a/app/views/editor/level/modals/LevelVersionsModal.coffee b/app/views/editor/level/modals/LevelVersionsModal.coffee index 21cb5a125..5194f7127 100644 --- a/app/views/editor/level/modals/LevelVersionsModal.coffee +++ b/app/views/editor/level/modals/LevelVersionsModal.coffee @@ -1,4 +1,4 @@ -VersionsModal = require 'views/modal/VersionsModal' +VersionsModal = require 'views/editor/modal/VersionsModal' module.exports = class LevelVersionsModal extends VersionsModal id: 'editor-level-versions-view' diff --git a/app/views/editor/level/modals/NewAchievementModal.coffee b/app/views/editor/level/modals/NewAchievementModal.coffee index 589f2c573..0978b3300 100644 --- a/app/views/editor/level/modals/NewAchievementModal.coffee +++ b/app/views/editor/level/modals/NewAchievementModal.coffee @@ -1,4 +1,4 @@ -NewModelModal = require 'views/modal/NewModelModal' +NewModelModal = require 'views/editor/modal/NewModelModal' template = require 'templates/editor/level/modal/new-achievement' forms = require 'core/forms' Achievement = require 'models/Achievement' diff --git a/app/views/editor/level/modals/SaveLevelModal.coffee b/app/views/editor/level/modals/SaveLevelModal.coffee index 1aca37a80..1786ad44d 100644 --- a/app/views/editor/level/modals/SaveLevelModal.coffee +++ b/app/views/editor/level/modals/SaveLevelModal.coffee @@ -1,4 +1,4 @@ -SaveVersionModal = require 'views/modal/SaveVersionModal' +SaveVersionModal = require 'views/editor/modal/SaveVersionModal' template = require 'templates/editor/level/save' forms = require 'core/forms' LevelComponent = require 'models/LevelComponent' diff --git a/app/views/editor/level/systems/LevelSystemEditView.coffee b/app/views/editor/level/systems/LevelSystemEditView.coffee index 76353dc3c..1bf4c1098 100644 --- a/app/views/editor/level/systems/LevelSystemEditView.coffee +++ b/app/views/editor/level/systems/LevelSystemEditView.coffee @@ -3,7 +3,7 @@ template = require 'templates/editor/level/system/level-system-edit-view' LevelSystem = require 'models/LevelSystem' SystemVersionsModal = require 'views/editor/level/systems/SystemVersionsModal' PatchesView = require 'views/editor/PatchesView' -SaveVersionModal = require 'views/modal/SaveVersionModal' +SaveVersionModal = require 'views/editor/modal/SaveVersionModal' module.exports = class LevelSystemEditView extends CocoView id: 'level-system-edit-view' diff --git a/app/views/editor/level/systems/SystemVersionsModal.coffee b/app/views/editor/level/systems/SystemVersionsModal.coffee index 75d0a4ba0..8c0e5e8aa 100755 --- a/app/views/editor/level/systems/SystemVersionsModal.coffee +++ b/app/views/editor/level/systems/SystemVersionsModal.coffee @@ -1,4 +1,4 @@ -VersionsModal = require 'views/modal/VersionsModal' +VersionsModal = require 'views/editor/modal/VersionsModal' module.exports = class SystemVersionsModal extends VersionsModal id: 'editor-system-versions-view' diff --git a/app/views/modal/ConfirmModal.coffee b/app/views/editor/modal/ConfirmModal.coffee similarity index 83% rename from app/views/modal/ConfirmModal.coffee rename to app/views/editor/modal/ConfirmModal.coffee index 712325d2c..8017aec21 100644 --- a/app/views/modal/ConfirmModal.coffee +++ b/app/views/editor/modal/ConfirmModal.coffee @@ -1,5 +1,5 @@ -ModalView = require '../core/ModalView' -template = require 'templates/modal/confirm' +ModalView = require '../../core/ModalView' +template = require 'templates/editor/modal/confirm-modal' module.exports = class ConfirmModal extends ModalView id: 'confirm-modal' diff --git a/app/views/modal/NewModelModal.coffee b/app/views/editor/modal/NewModelModal.coffee similarity index 96% rename from app/views/modal/NewModelModal.coffee rename to app/views/editor/modal/NewModelModal.coffee index 1da2680fe..c336028a9 100644 --- a/app/views/modal/NewModelModal.coffee +++ b/app/views/editor/modal/NewModelModal.coffee @@ -1,5 +1,5 @@ ModalView = require 'views/core/ModalView' -template = require 'templates/modal/new_model' +template = require 'templates/editor/modal/new-model-modal' forms = require 'core/forms' module.exports = class NewModelModal extends ModalView diff --git a/app/views/modal/SaveVersionModal.coffee b/app/views/editor/modal/SaveVersionModal.coffee similarity index 97% rename from app/views/modal/SaveVersionModal.coffee rename to app/views/editor/modal/SaveVersionModal.coffee index f99061908..91cd3e997 100644 --- a/app/views/modal/SaveVersionModal.coffee +++ b/app/views/editor/modal/SaveVersionModal.coffee @@ -1,5 +1,5 @@ ModalView = require 'views/core/ModalView' -template = require 'templates/modal/save_version' +template = require 'templates/editor/modal/save-version-modal' DeltaView = require 'views/editor/DeltaView' Patch = require 'models/Patch' forms = require 'core/forms' diff --git a/app/views/modal/VersionsModal.coffee b/app/views/editor/modal/VersionsModal.coffee similarity index 97% rename from app/views/modal/VersionsModal.coffee rename to app/views/editor/modal/VersionsModal.coffee index 4bf9b85a6..fe4b40c77 100755 --- a/app/views/modal/VersionsModal.coffee +++ b/app/views/editor/modal/VersionsModal.coffee @@ -1,5 +1,5 @@ ModalView = require 'views/core/ModalView' -template = require 'templates/modal/versions' +template = require 'templates/editor/modal/versions-modal' DeltaView = require 'views/editor/DeltaView' PatchModal = require 'views/editor/PatchModal' nameLoader = require 'core/NameLoader' diff --git a/app/views/editor/thang/ThangTypeEditView.coffee b/app/views/editor/thang/ThangTypeEditView.coffee index f980becb2..a4cd81969 100644 --- a/app/views/editor/thang/ThangTypeEditView.coffee +++ b/app/views/editor/thang/ThangTypeEditView.coffee @@ -16,7 +16,7 @@ ThangTypeColorsTabView = require './ThangTypeColorsTabView' PatchesView = require 'views/editor/PatchesView' ForkModal = require 'views/editor/ForkModal' VectorIconSetupModal = require 'views/editor/thang/VectorIconSetupModal' -SaveVersionModal = require 'views/modal/SaveVersionModal' +SaveVersionModal = require 'views/editor/modal/SaveVersionModal' template = require 'templates/editor/thang/thang-type-edit-view' storage = require 'core/storage' diff --git a/app/views/editor/thang/ThangTypeVersionsModal.coffee b/app/views/editor/thang/ThangTypeVersionsModal.coffee index 46bda96fc..3e8dce33c 100755 --- a/app/views/editor/thang/ThangTypeVersionsModal.coffee +++ b/app/views/editor/thang/ThangTypeVersionsModal.coffee @@ -1,4 +1,4 @@ -VersionsModal = require 'views/modal/VersionsModal' +VersionsModal = require 'views/editor/modal/VersionsModal' module.exports = class ThangTypeVersionsModal extends VersionsModal id: 'editor-thang-versions-view' diff --git a/app/views/i18n/I18NEditModelView.coffee b/app/views/i18n/I18NEditModelView.coffee index 826bef69b..a3fa8d14b 100644 --- a/app/views/i18n/I18NEditModelView.coffee +++ b/app/views/i18n/I18NEditModelView.coffee @@ -5,7 +5,7 @@ template = require 'templates/i18n/i18n-edit-model-view' deltasLib = require 'core/deltas' # in the template, but need to require to load them -require 'modal/RevertModal' +require 'views/modal/RevertModal' module.exports = class I18NEditModelView extends RootView className: 'editor i18n-edit-model-view' diff --git a/app/views/modal/RevertModal.coffee b/app/views/modal/RevertModal.coffee index d931e9dbf..f6f977c75 100644 --- a/app/views/modal/RevertModal.coffee +++ b/app/views/modal/RevertModal.coffee @@ -1,5 +1,5 @@ ModalView = require 'views/core/ModalView' -template = require 'templates/modal/revert' +template = require 'templates/modal/revert-modal' CocoModel = require 'models/CocoModel' module.exports = class RevertModal extends ModalView diff --git a/config.coffee b/config.coffee index b5d6145d4..ef8ffb25e 100644 --- a/config.coffee +++ b/config.coffee @@ -184,6 +184,7 @@ for file in coffeeFiles inputFile = file.replace('./app', 'app') outputFile = file.replace('.coffee', '.js').replace('./app', 'javascripts/app') exports.config.files.javascripts.joinTo[outputFile] = inputFile + console.log 'output file?', outputFile numBundles = 0 @@ -198,6 +199,7 @@ for file in jadeFiles possibleViewFilePath = outputFile.replace(templateFileName, viewFileName).replace('/templates/', '/views/') if exports.config.files.javascripts.joinTo[possibleViewFilePath] exports.config.files.templates.joinTo[possibleViewFilePath] = inputFile + console.log 'bundling', inputFile, 'to', possibleViewFilePath numBundles += 1 console.log 'Bundled', numBundles, 'templates with their views.' \ No newline at end of file From 02ddd7f698dbe3880e478993178a9ab23b23d022 Mon Sep 17 00:00:00 2001 From: Scott Erickson Date: Sat, 29 Nov 2014 13:47:04 -0800 Subject: [PATCH 2/5] Fixed #1816. Cleaned up logging in config.coffee. --- app/templates/core/auth.jade | 2 +- .../recover.jade => core/recover-modal.jade} | 0 app/views/{modal => core}/RecoverModal.coffee | 2 +- config.coffee | 50 +++++++++---------- 4 files changed, 26 insertions(+), 28 deletions(-) rename app/templates/{modal/recover.jade => core/recover-modal.jade} (100%) rename app/views/{modal => core}/RecoverModal.coffee (96%) diff --git a/app/templates/core/auth.jade b/app/templates/core/auth.jade index 42ed83c63..92d6c5d62 100644 --- a/app/templates/core/auth.jade +++ b/app/templates/core/auth.jade @@ -82,4 +82,4 @@ block modal-footer div.network-login .gplus-login-button#gplus-login-button div#recover-account-wrapper - a(data-toggle="coco-modal", data-target="modal/RecoverModal", data-i18n="login.recover")#link-to-recover recover account + a(data-toggle="coco-modal", data-target="core/RecoverModal", data-i18n="login.recover")#link-to-recover recover account diff --git a/app/templates/modal/recover.jade b/app/templates/core/recover-modal.jade similarity index 100% rename from app/templates/modal/recover.jade rename to app/templates/core/recover-modal.jade diff --git a/app/views/modal/RecoverModal.coffee b/app/views/core/RecoverModal.coffee similarity index 96% rename from app/views/modal/RecoverModal.coffee rename to app/views/core/RecoverModal.coffee index bd435a714..21358a634 100644 --- a/app/views/modal/RecoverModal.coffee +++ b/app/views/core/RecoverModal.coffee @@ -1,5 +1,5 @@ ModalView = require 'views/core/ModalView' -template = require 'templates/modal/recover' +template = require 'templates/core/recover-modal' forms = require 'core/forms' {genericFailure} = require 'core/errors' diff --git a/config.coffee b/config.coffee index ef8ffb25e..41dd91c5e 100644 --- a/config.coffee +++ b/config.coffee @@ -10,29 +10,6 @@ commonjsHeader = fs.readFileSync('node_modules/brunch/node_modules/commonjs-requ regJoin = (s) -> new RegExp(s.replace(/\//, '[\\\/\\\\]')) -#- Find all .coffee and .jade files in /app - -dirStack = ['./app'] -coffeeFiles = [] -jadeFiles = [] - -while dirStack.length - dir = dirStack.pop() - contents = fs.readdirSync(dir) - for file in contents - fullPath = "#{dir}/#{file}" - stat = fs.statSync(fullPath) - if stat.isDirectory() - dirStack.push(fullPath) - else - if _.str.endsWith(file, '.coffee') - coffeeFiles.push(fullPath) - else if _.str.endsWith(file, '.jade') - jadeFiles.push(fullPath) - -console.log "Got #{coffeeFiles.length} coffee files and #{jadeFiles.length} jade files." - - #- Build the config exports.config = @@ -102,6 +79,8 @@ exports.config = #- test, demo libraries 'javascripts/test-app.js': regJoin('^test/app/') 'javascripts/demo-app.js': regJoin('^test/demo/') + + #- More output files are generated at the below order: before: [ @@ -180,11 +159,31 @@ exports.config = defn = if path in needHeaders then commonjsHeader else '' return defn + +#- Find all .coffee and .jade files in /app + +dirStack = ['./app'] +coffeeFiles = [] +jadeFiles = [] + +while dirStack.length + dir = dirStack.pop() + contents = fs.readdirSync(dir) + for file in contents + fullPath = "#{dir}/#{file}" + stat = fs.statSync(fullPath) + if stat.isDirectory() + dirStack.push(fullPath) + else + if _.str.endsWith(file, '.coffee') + coffeeFiles.push(fullPath) + else if _.str.endsWith(file, '.jade') + jadeFiles.push(fullPath) + for file in coffeeFiles inputFile = file.replace('./app', 'app') outputFile = file.replace('.coffee', '.js').replace('./app', 'javascripts/app') exports.config.files.javascripts.joinTo[outputFile] = inputFile - console.log 'output file?', outputFile numBundles = 0 @@ -199,7 +198,6 @@ for file in jadeFiles possibleViewFilePath = outputFile.replace(templateFileName, viewFileName).replace('/templates/', '/views/') if exports.config.files.javascripts.joinTo[possibleViewFilePath] exports.config.files.templates.joinTo[possibleViewFilePath] = inputFile - console.log 'bundling', inputFile, 'to', possibleViewFilePath numBundles += 1 -console.log 'Bundled', numBundles, 'templates with their views.' \ No newline at end of file +console.log "Got #{coffeeFiles.length} coffee files and #{jadeFiles.length} jade files (bundled #{numBundles} of them together)." \ No newline at end of file From 52311bd256ffad0fd959ccdcbe4a8d53448a39db Mon Sep 17 00:00:00 2001 From: Dmitry Date: Sun, 30 Nov 2014 01:24:19 +0300 Subject: [PATCH 3/5] update RU translation --- app/locale/ru.coffee | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/app/locale/ru.coffee b/app/locale/ru.coffee index 471875c81..1bc25c7c9 100644 --- a/app/locale/ru.coffee +++ b/app/locale/ru.coffee @@ -10,7 +10,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi for_beginners: "Новичкам" multiplayer: "Мультиплеер" # Not currently shown on home page for_developers: "Разработчикам" # Not currently shown on home page. -# or_ipad: "Or download for iPad" + or_ipad: "Или скачайте на iPad" nav: play: "Уровни" # The top nav bar entry where players choose which levels to play @@ -56,7 +56,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi confirm: "Подтвердить" owned: "Уже есть" # For items you own locked: "Заблокировано" -# purchasable: "Purchasable" # For a hero you unlocked but haven't purchased + purchasable: "Можно купить" # For a hero you unlocked but haven't purchased available: "Доступно" skills_granted: "Умение получено" # Property documentation details heroes: "Герои" # Tooltip on hero shop button from /play @@ -209,8 +209,8 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi failing: "Неудача" action_timeline: "График действий" click_to_select: "Выберите персонажа, щёлкнув на нём" -# control_bar_multiplayer: "Multiplayer" -# control_bar_join_game: "Join Game" + control_bar_multiplayer: "Мультиплеер" + control_bar_join_game: "Присоединиться" reload: "Перезагрузить" reload_title: "Перезагрузить код полностью?" reload_really: "Вы уверены, что хотите начать уровень сначала?" @@ -247,7 +247,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi tome_select_a_thang: "Выбрать кого-нибудь для " tome_available_spells: "Доступные заклинания" tome_your_skills: "Ваши навыки" -# tome_help: "Help" + tome_help: "Помощь" tome_current_method: "Текущий метод" hud_continue_short: "Продолжить" code_saved: "Код сохранен" @@ -324,12 +324,12 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi few_gems: "Немного самоцветов" pile_gems: "Кучка самоцветов" chest_gems: "Сундук с самоцветами" -# purchasing: "Purchasing..." -# declined: "Your card was declined" -# retrying: "Server error, retrying." -# prompt_title: "Not Enough Gems" -# prompt_body: "Do you want to get more?" -# prompt_button: "Enter Shop" + purchasing: "Покупка..." + declined: "Ваша карта отклонена" + retrying: "Ошибка сервера, пробуем еще раз." + prompt_title: "Не хватает самоцветов" + prompt_body: "Хотите еще?" + prompt_button: "Войти в магазин" choose_hero: choose_hero: "Выберите героя" @@ -355,9 +355,9 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi range: "Зона" # As in "attack or visual range" blocks: "Блокирует" # As in "this shield blocks this much damage" skills: "Умения" -# available_for_purchase: "Available for Purchase" + available_for_purchase: "Доступно для покупки" # level_to_unlock: "Level to unlock:" -# restricted_to_certain_heroes: "Only certain heroes can play this level." + restricted_to_certain_heroes: "Только определенные герои могут играть этот уровень." # skill_docs: # writable: "writable" # Hover over "attack" in Your Skills while playing a level to see most of this @@ -410,9 +410,9 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi why_codecombat: "Почему CodeCombat?" why_paragraph_1: "Нужно научиться программировать? Вам не нужны уроки. Вам нужно написать много кода и прекрасно провести время, делая это." why_paragraph_2_prefix: "Вот где программирование. Это должно быть весело. Не забавно, вроде" - why_paragraph_2_italic: "вау, значок," + why_paragraph_2_italic: "\"вау, значок\"," why_paragraph_2_center: "а" - why_paragraph_2_italic_caps: "НЕТ, МАМ, Я ДОЛЖЕН ПРОЙТИ УРОВЕНЬ!" + why_paragraph_2_italic_caps: "\"НЕТ, МАМ, Я ДОЛЖЕН ПРОЙТИ УРОВЕНЬ!\"" why_paragraph_2_suffix: "Вот, почему CodeCombat - мультиплеерная игра, а не курс уроков в игровой форме. Мы не остановимся, пока вы не потеряете голову - в данном случае, это хорошо." why_paragraph_3: "Если вы собираетесь увлечься какой-нибудь игрой, увлекитесь этой и станьте одним из волшебников века информационных технологий." press_title: "Блогерам/Прессе" @@ -777,8 +777,8 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi amount_achieved: "Количество" achievement: "Достижение" category_contributor: "Помощь" -# category_ladder: "Ladder" -# category_level: "Level" + category_ladder: "Ладдер" + category_level: "Уровень" category_miscellaneous: "Помощь" category_levels: "Уровни" category_undefined: "Неопределено" @@ -850,7 +850,7 @@ module.exports = nativeDescription: "русский", englishDescription: "Russi # candidates: "Candidates" # candidate_sessions: "Candidate Sessions" user_remark: "Пользовательские поправки" -# user_remarks: "User Remarks" + user_remarks: "Пользовательские поправки" versions: "Версии" items: "Предметы" heroes: "Герои" From c226856204191573c47bca9d90a4cb235ebd9544 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Sat, 29 Nov 2014 14:42:37 -0800 Subject: [PATCH 4/5] Fixed typo in previous rewadding. --- app/templates/editor/modal/versions-modal.jade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/editor/modal/versions-modal.jade b/app/templates/editor/modal/versions-modal.jade index a8a931477..7c9f7cc5c 100755 --- a/app/templates/editor/modal/versions-modal.jade +++ b/app/templates/editor/modal/versions-modal.jade @@ -25,7 +25,7 @@ block modal-body-content td input(type="checkbox", value=data._id).select td - a(href="/editor#{page}/#{data._id}") #{data.version.major}.#{data.version.minor} + a(href="/editor/#{page}/#{data._id}") #{data.version.major}.#{data.version.minor} td= moment(data.created).format('l') td= data.creator td #{data.commitMessage} From fe558110759971c20c451f8275d29667b4f4d357 Mon Sep 17 00:00:00 2001 From: Nick Winter Date: Sat, 29 Nov 2014 15:06:54 -0800 Subject: [PATCH 5/5] Fixed a bit of repaining that was going on when it shouldn't. --- app/views/play/WorldMapView.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/play/WorldMapView.coffee b/app/views/play/WorldMapView.coffee index 789a1159b..d212784ff 100644 --- a/app/views/play/WorldMapView.coffee +++ b/app/views/play/WorldMapView.coffee @@ -220,6 +220,7 @@ module.exports = class WorldMapView extends RootView return if @manuallyPositionedLevelInfoID and levelID isnt @manuallyPositionedLevelInfoID @$el.find(".level-info-container[data-level-id='#{levelID}']").hide() @manuallyPositionedLevelInfoID = null + @$levelInfo = null onMouseMoveMap: (e) -> return if application.isIPadApp