= $content ?>
+ +diff --git a/src/assets/js/default.js b/src/assets/js/default.js
index 8bb93cd7..603c0fa9 100644
--- a/src/assets/js/default.js
+++ b/src/assets/js/default.js
@@ -40,9 +40,7 @@ $(function() {
console.log(element);
console.log(xhr);
- if (response.startsWith('
')) {
- response = response.replace('
', '');
- }
+ response = response.replace('
', '');
$('body')
.modal({
@@ -87,11 +85,6 @@ $(function() {
filterRemoteData: true
});
- /**
- * Refresh Wishlist
- */
- // wishlistRefresh();
-
/**
* Commit to Product
*/
@@ -178,14 +171,3 @@ $(function() {
.modal('show');
});
});
-
-function wishlistRefresh() {
- /**
- * URL Parameter
- */
- $('.ui.dropdown.wishlists').api({
- action: 'get wishlists',
- method: 'GET',
- on: 'now'
- });
-}
diff --git a/src/classes/page.php b/src/classes/page.php
index 3d7b3327..618e1467 100644
--- a/src/classes/page.php
+++ b/src/classes/page.php
@@ -10,6 +10,76 @@ use wishthis\User;
class Page
{
+ /**
+ * Static
+ *
+ * @return string
+ */
+ public static function message(string $content = '', string $header = '', string $type = ''): string
+ {
+ ob_start();
+
+ $containerClasses = array('ui', 'message');
+ $iconClasses = array('ui', 'icon');
+
+ switch ($type) {
+ case 'error':
+ $containerClasses[] = 'error icon';
+ $iconClasses[] = 'exclamation triangle';
+ break;
+
+ case 'warning':
+ $containerClasses[] = 'warning icon';
+ $iconClasses[] = 'exclamation circle';
+ break;
+
+ case 'info':
+ $containerClasses[] = 'info icon';
+ $iconClasses[] = 'info circle';
+ break;
+ }
+
+ $containerClass = implode(' ', $containerClasses);
+ $iconClass = implode(' ', $iconClasses);
+ ?>
+
= $content ?>
+ +