\ No newline at end of file
diff --git a/webchat/components/expansive-search-bar/expansive-search-bar.html b/webchat/components/expansive-search-bar/expansive-search-bar.html
index a92cdaf2f..53272bbb1 100644
--- a/webchat/components/expansive-search-bar/expansive-search-bar.html
+++ b/webchat/components/expansive-search-bar/expansive-search-bar.html
@@ -1,6 +1,6 @@
{
- iconButtonCtrl.iconColor = iconButtonCtrl.iconColor || "#EEE";
+ _.defaults(iconButtonCtrl, {
+ iconColor: "#EEE",
+ action: () => {},
+ disabled: false,
+ });
};
+
}
})();
\ No newline at end of file
diff --git a/webchat/components/icon-button/icon-button.html b/webchat/components/icon-button/icon-button.html
index de63ad5d2..70dd0dbc1 100644
--- a/webchat/components/icon-button/icon-button.html
+++ b/webchat/components/icon-button/icon-button.html
@@ -1,5 +1,5 @@
-
-
+
+
{{iconButtonCtrl.icon}}
\ No newline at end of file
diff --git a/webchat/components/toggle-button/toggle-button.component.js b/webchat/components/toggle-button/toggle-button.component.js
new file mode 100644
index 000000000..c3575f400
--- /dev/null
+++ b/webchat/components/toggle-button/toggle-button.component.js
@@ -0,0 +1,67 @@
+(function () {
+ 'use strict';
+
+ /**
+ * Button that calls an action and changes its icon on click.
+ * It receives as a binding an icon to shown when on and an
+ * icon to show when off. Also it receives an action to be
+ * called on click and the icons color when on and off. If
+ * the icon color is not passed, its color will be a default
+ * one (#EEE).
+ * @class toggleButton
+ * @example
+ *
+ *
+ *
+ */
+ angular.module("webchat").component("toggleButton", {
+ templateUrl: "app/components/toggle-button/toggle-button.html",
+ controller: toggleButtonController,
+ controllerAs: "toggleButtonCtrl",
+ bindings: {
+ iconOn: '@',
+ iconOff: '@',
+ iconColorOn: '@',
+ iconColorOff: '@',
+ action: '<',
+ },
+ });
+
+ function toggleButtonController() {
+ const toggleButtonCtrl = this;
+
+ toggleButtonCtrl.$onInit = () => {
+ console.log(toggleButtonCtrl);
+ _.defaults(toggleButtonCtrl, {
+ active: true,
+ iconColorOn: "#EEE",
+ iconColorOff: "#EEE",
+ action: () => {}
+ });
+ console.log(toggleButtonCtrl);
+ };
+
+ toggleButtonCtrl.toggle = () => {
+ toggleButtonCtrl.active = !toggleButtonCtrl.active;
+ toggleButtonCtrl.action();
+ };
+
+ Object.defineProperty(toggleButtonCtrl, 'activeIcon', {
+ get: () => {
+ return toggleButtonCtrl.active ? toggleButtonCtrl.iconOn : toggleButtonCtrl.iconOff;
+ },
+ });
+
+ Object.defineProperty(toggleButtonCtrl, 'activeIconColor', {
+ get: () => {
+ return toggleButtonCtrl.active ? toggleButtonCtrl.iconColorOn : toggleButtonCtrl.iconColorOff;
+ },
+ });
+ }
+
+})();
\ No newline at end of file
diff --git a/webchat/chat/chat.html b/webchat/components/toggle-button/toggle-button.css
similarity index 100%
rename from webchat/chat/chat.html
rename to webchat/components/toggle-button/toggle-button.css
diff --git a/webchat/components/toggle-button/toggle-button.html b/webchat/components/toggle-button/toggle-button.html
new file mode 100644
index 000000000..b066812bf
--- /dev/null
+++ b/webchat/components/toggle-button/toggle-button.html
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/webchat/ecis.css b/webchat/ecis.css
index b10ce0758..5cb6d8aaf 100644
--- a/webchat/ecis.css
+++ b/webchat/ecis.css
@@ -1,9 +1,4 @@
-html, body {
- height: 100%;
- max-height: 100%;
-}
-
-#webchat {
+html, body, #main {
height: 100%;
max-height: 100%;
}
diff --git a/webchat/index.html b/webchat/index.html
index f37100b09..5d91c4f0e 100644
--- a/webchat/index.html
+++ b/webchat/index.html
@@ -29,6 +29,7 @@
+
@@ -43,7 +44,7 @@
-
+
@@ -61,7 +62,7 @@
-
+
-
-
+
+
diff --git a/webchat/webchat/webchat.css b/webchat/main/main.css
similarity index 83%
rename from webchat/webchat/webchat.css
rename to webchat/main/main.css
index 3dde1b912..f59069010 100644
--- a/webchat/webchat/webchat.css
+++ b/webchat/main/main.css
@@ -1,4 +1,4 @@
-.webchat__container {
+.main__container {
height: 100%;
display: grid;
grid-template-columns: 100%;
@@ -10,10 +10,10 @@
animation-duration: 0.5s;
}
-.webchat__header {
+.main__header {
grid-area: header;
}
-.webchat__content {
+.main__content {
grid-area: content;
}
\ No newline at end of file
diff --git a/webchat/main/main.html b/webchat/main/main.html
new file mode 100644
index 000000000..8f21e5aa6
--- /dev/null
+++ b/webchat/main/main.html
@@ -0,0 +1,4 @@
+