Commit c08949d2 authored by gaseema.n's avatar gaseema.n

inventory update

parent bb2f1a84
......@@ -3242,7 +3242,7 @@
</div>
<ul class="sponsoredPrd-collapsible collapsible collapsible-accordion chStoreUpdate" data-collapsible="accordion" style="background:white; margin: 10px;"> </ul>
<div class="fixed-action-btn direction-top active">
<a onclick="$('#spnsrdModal').modal('open')" class="btn-floating opacitySelectedColor" style="width: 55px; height: 55px; border-radius: 50%; line-height: 55px; font-size: 2em;">
<a id="inventoryAddBtn" onclick="$('#spnsrdModal').modal('open'); document.getElementById('inventoryAddBtn').classList.remove('pulse')" class="btn-floating opacitySelectedColor" style="width: 55px; height: 55px; border-radius: 50%; line-height: 55px; font-size: 2em;">
<p style="margin-top:0px !important;text-align:center;">+</p>
</a>
</div>
......
......@@ -120,6 +120,7 @@ angular.module('sokoApp', [])
}
if (getBitsWinOpt('page') == 'inventory') {
openInventoryPage();
isInventoryActive()
if(getBitsWinOpt('sel')=="add"){
$('#spnsrdModal').modal('open');
}
......
var inventoryItemsActive = false
function openInventoryPage() {
$('#content > .container > div').css('display', 'none');
setTimeout(function(e) {
......@@ -7,6 +9,20 @@ function openInventoryPage() {
sponpProdNamesInput();
}
function isInventoryActive() {
getObjectStore('data', 'readwrite').get('soko-store-' + localStorage.getItem('soko-active-store') + '-products').onsuccess = function(event) {
var reqs = JSON.parse(event.target.result);
for (var i = 0; i < reqs.length; ++i) {
if (reqs[i].sponsored == "true") {
inventoryItemsActive = true
}
}
if (inventoryItemsActive != true) {
document.getElementById('inventoryAddBtn').classList.add('pulse')
}
}
}
//Input Initiallization
var sponProds = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment