From d53566c034de8afcc366f9a89488f5ce9a7eb8dd Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 11 Feb 2015 15:14:40 +0300 Subject: [PATCH] Replaced symbolic links with forceLayout map Closes #686 --- app/js/lib/utils.js | 9 ++++++++- app/partials/desktop/error_modal.html | 2 +- app/partials/mobile/confirm_modal.html | 1 - app/partials/mobile/error_modal.html | 1 - app/partials/mobile/media_modal_layout.html | 1 - app/partials/mobile/slider.html | 1 - 6 files changed, 9 insertions(+), 6 deletions(-) delete mode 120000 app/partials/mobile/confirm_modal.html delete mode 120000 app/partials/mobile/error_modal.html delete mode 120000 app/partials/mobile/media_modal_layout.html delete mode 120000 app/partials/mobile/slider.html diff --git a/app/js/lib/utils.js b/app/js/lib/utils.js index 8d2f66a1..43f6e63b 100644 --- a/app/js/lib/utils.js +++ b/app/js/lib/utils.js @@ -275,7 +275,14 @@ function listUniqSorted (list) { } function templateUrl (tplName) { - return 'partials/' + (Config.Mobile ? 'mobile' : 'desktop') + '/' + tplName + '.html'; + var forceLayout = { + confirm_modal: 'desktop', + error_modal: 'desktop', + media_modal_layout: 'desktop', + slider: 'desktop', + }; + var layout = forceLayout[tplName] || (Config.Mobile ? 'mobile' : 'desktop'); + return 'partials/' + layout + '/' + tplName + '.html'; } function encodeEntities(value) { diff --git a/app/partials/desktop/error_modal.html b/app/partials/desktop/error_modal.html index a5a979ac..4625014a 100644 --- a/app/partials/desktop/error_modal.html +++ b/app/partials/desktop/error_modal.html @@ -66,7 +66,7 @@ Stack: {{error.originalError.stack || error.stack}} diff --git a/app/partials/mobile/confirm_modal.html b/app/partials/mobile/confirm_modal.html deleted file mode 120000 index 4c0d83ab..00000000 --- a/app/partials/mobile/confirm_modal.html +++ /dev/null @@ -1 +0,0 @@ -../desktop/confirm_modal.html \ No newline at end of file diff --git a/app/partials/mobile/error_modal.html b/app/partials/mobile/error_modal.html deleted file mode 120000 index 7a0888d1..00000000 --- a/app/partials/mobile/error_modal.html +++ /dev/null @@ -1 +0,0 @@ -../desktop/error_modal.html \ No newline at end of file diff --git a/app/partials/mobile/media_modal_layout.html b/app/partials/mobile/media_modal_layout.html deleted file mode 120000 index ba26f3f7..00000000 --- a/app/partials/mobile/media_modal_layout.html +++ /dev/null @@ -1 +0,0 @@ -../desktop/media_modal_layout.html \ No newline at end of file diff --git a/app/partials/mobile/slider.html b/app/partials/mobile/slider.html deleted file mode 120000 index 0ed70a67..00000000 --- a/app/partials/mobile/slider.html +++ /dev/null @@ -1 +0,0 @@ -../desktop/slider.html \ No newline at end of file