diff --git a/plugin.json b/plugin.json index 8d5463e..7c575f9 100644 --- a/plugin.json +++ b/plugin.json @@ -16,6 +16,20 @@ }, "settings": { "enabled": false + }, + "language": { + "enabled": true, + "languageJsonPath": "resources/languages.json" + }, + "cssInjection": { + "enabled": true, + "layouts": [ + { + "name": "Layout 1", + "imageUrl": "resources/layouts_img/layout1.png", + "cssPath": "widget/layouts/layout1.css" + } + ] } }, "widget": { diff --git a/resources/languages.json b/resources/languages.json new file mode 100644 index 0000000..c6fbcbb --- /dev/null +++ b/resources/languages.json @@ -0,0 +1,22 @@ +{ + "sections": { + "general": { + "title": "General", + "labels": { + "contactInfo": { + "title": "Contact Info", + "defaultValue": "Contact Info", + "placeholder": "Contact Info", + "toolTip":"Contact Info button label" + }, + "done": { + "title": "Done", + "defaultValue": "Done", + "maxLength":15, + "placeholder": "Done", + "toolTip":"Close contact information dialog label" + } + } + } + } +} diff --git a/resources/layouts_img/layout1.png b/resources/layouts_img/layout1.png new file mode 100644 index 0000000..27d04db Binary files /dev/null and b/resources/layouts_img/layout1.png differ diff --git a/widget/controllers/widget.home.controller.js b/widget/controllers/widget.home.controller.js index 3cfe218..bf97114 100644 --- a/widget/controllers/widget.home.controller.js +++ b/widget/controllers/widget.home.controller.js @@ -7,6 +7,7 @@ var WidgetHome = this; var currentListLayout = null; WidgetHome.data = {}; + WidgetHome.closeButtonText = 'Done'; //create new instance of buildfire carousel viewer WidgetHome.view = null; @@ -150,6 +151,12 @@ console.log("Error while getting the device context data", error) }; buildfire.getContext(getDevice); + + buildfire.language.get({stringKey: "general.done"}, (err, result) => { + if (err) return console.error("Error while retrieving string value", err); + WidgetHome.closeButtonText = result; + }); + cb(); } @@ -232,7 +239,7 @@ }); if (actionItems && actionItems.length) { - var options = {}; + var options = {closeButtonText : WidgetHome.closeButtonText}; var callback = function (error, result) { if (error) { console.error('Error:', error); diff --git a/widget/css/widget.app.css b/widget/css/widget.app.css index fd04379..66c109c 100644 --- a/widget/css/widget.app.css +++ b/widget/css/widget.app.css @@ -1,15 +1,33 @@ /* Plugin CSS */ -.contact-plugin.layout2 .contact-maps{ - position:relative; +.contact-plugin.layout1 .contact-info-button { + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.contact-plugin.layout2 .contact-info-button { + display: block; + max-width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } -.contact-plugin.layout2 .plugin-slider .plugin-slide{ - background:none; + +.contact-plugin.layout2 .contact-maps { + position: relative; +} + +.contact-plugin.layout2 .plugin-slider .plugin-slide { + background: none; } -.contact-plugin.layout2 .plugin-slider, -.contact-plugin.layout2 .plugin-slider .contact-slide{ - max-height:100px; - background:none; + +.contact-plugin.layout2 .plugin-slider, +.contact-plugin.layout2 .plugin-slider .contact-slide { + max-height: 100px; + background: none; } + /* End Plugin CSS */ /* Styles for home page carousel - to align and style the slider items*/ @@ -20,13 +38,13 @@ /* To hide map report error link */ -.gmnoprint a{ - display:none; +.gmnoprint a { + display: none; } /* To overlay texts on background */ -.text-overlay{ - position:relative +.text-overlay { + position: relative } /*background image css class*/ @@ -50,18 +68,17 @@ text-align: center; } -.mapSize{ -height: 192px; -} - -.holder .info-bar{ - position:absolute; - bottom:0; - left:0; - width:100%; - padding:10px 0; - opacity:0.85; - z-index:9; - -webkit-transform:translate3d(0,0,0); +.map-size { + height: 192px; } +.holder .info-bar { + position: absolute; + bottom: 0; + left: 0; + width: 100%; + padding: 10px 0; + opacity: 0.85; + z-index: 9; + -webkit-transform: translate3d(0, 0, 0); +} \ No newline at end of file diff --git a/widget/index.html b/widget/index.html index 8880611..3740ed5 100644 --- a/widget/index.html +++ b/widget/index.html @@ -2,6 +2,7 @@ + diff --git a/widget/layouts/layout1.css b/widget/layouts/layout1.css new file mode 100644 index 0000000..54f5d87 --- /dev/null +++ b/widget/layouts/layout1.css @@ -0,0 +1 @@ +/* Here you can add your own custom CSS */ \ No newline at end of file diff --git a/widget/templates/Layout_1.html b/widget/templates/Layout_1.html index 9b99641..80b1f12 100644 --- a/widget/templates/Layout_1.html +++ b/widget/templates/Layout_1.html @@ -7,8 +7,9 @@
- Contact + Contact info

-
diff --git a/widget/templates/Layout_2.html b/widget/templates/Layout_2.html index 24b06a7..60a90e8 100644 --- a/widget/templates/Layout_2.html +++ b/widget/templates/Layout_2.html @@ -2,7 +2,7 @@
-
@@ -35,8 +35,9 @@