Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
soko
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bitsoko services
soko
Commits
e22a0350
Unverified
Commit
e22a0350
authored
Dec 11, 2018
by
bitsoko
Committed by
GitHub
Dec 11, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #58 from bitsoko-services/master
updates
parents
d521efa1
4d5ae12b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
18 deletions
+42
-18
style.css
css/style.css
+14
-0
index.html
index.html
+8
-8
bitsoko.js
js/bitsoko.js
+0
-4
custom-script.js
js/custom-script.js
+1
-0
inventory.js
js/inventory.js
+19
-6
No files found.
css/style.css
View file @
e22a0350
...
...
@@ -28,6 +28,20 @@ body {
cursor
:
default
;
}
.switchStoreHeader
{
margin
:
0px
;
position
:
fixed
;
height
:
75px
;
}
.swtchTabs
{
height
:
50px
!important
;
position
:
fixed
;
z-index
:
1
;
margin-top
:
75px
;
left
:
0px
;
}
.modal
{
/* height: 80% !important; */
margin-top
:
0px
!important
;
...
...
index.html
View file @
e22a0350
...
...
@@ -250,7 +250,7 @@
</div>
-->
<div
class=
"modal-content"
style=
"padding:0px;"
>
<div
class=
"row selectedColor switchStoreHeader"
style=
"margin: 0px;"
>
<div
class=
"row selectedColor switchStoreHeader"
>
<div
class=
"col s7"
>
<h5
style=
"margin:0px;"
>
SWITCH STORE
</h5>
<p
style=
"margin:0px;"
>
STORES:
<span
id=
"storeNo"
></span></p>
...
...
@@ -259,19 +259,19 @@
<a
class=
"btn bits right"
style=
"padding: 0px 10px; background: green; font-size: 2.3em; border-radius: 50%; height: 40px; width: 40px; line-height: 40px;"
onclick=
'$("#switchStoreModal").modal("close"); $("#newStoreModal").modal("open")'
>
+
</a>
</div>
</div>
<div
style=
"
padding:0px 10px;
"
class=
"swtchStrDskt"
>
<div
style=
""
class=
"swtchStrDskt"
>
<div
class=
"row switchStoreDiv"
>
<div
class=
"col s12"
>
<ul
class=
"tabs
"
style=
"height: 50px;
"
>
<li
class=
"tab col s3"
><a
style=
"color:
black
;"
href=
"#myStores"
>
My Stores
</a></li>
<li
class=
"tab col s3"
><a
style=
"color:
black
;"
class=
"active"
href=
"#managedStores"
>
Managed Stores
</a></li>
<ul
class=
"tabs
selectedColor swtchTabs
"
>
<li
class=
"tab col s3"
><a
style=
"color:
white
;"
href=
"#myStores"
>
My Stores
</a></li>
<li
class=
"tab col s3"
><a
style=
"color:
white
;"
class=
"active"
href=
"#managedStores"
>
Managed Stores
</a></li>
</ul>
</div>
<div
id=
"myStores"
class=
"col s12"
>
<ul
id=
"myStoreContent"
class=
"collection"
style=
"text-align:center;"
></ul>
<ul
id=
"myStoreContent"
class=
"collection"
style=
"text-align:center;
margin-top: 145px;
"
></ul>
</div>
<div
id=
"managedStores"
class=
"col s12"
>
<ul
id=
"managedStoreContent"
class=
"collection"
style=
"text-align:center;"
></ul>
<ul
id=
"managedStoreContent"
class=
"collection"
style=
"text-align:center;
margin-top: 145px;
"
></ul>
</div>
</div>
</div>
...
...
@@ -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>
...
...
js/bitsoko.js
View file @
e22a0350
...
...
@@ -72,10 +72,6 @@ function profileLoaded(p) {
$
(
'.profile-image'
).
attr
(
'src'
,
p
.
image
);
//p.ownerid=1;
localStorage
.
setItem
(
'soko-owner-id'
,
p
.
bitsokoUserID
);
M
.
toast
({
html
:
'Signing in...'
,
displayLength
:
3000
})
$
(
"#signingIn"
).
html
(
"Signing In. Please Wait"
);
updateStores
();
...
...
js/custom-script.js
View file @
e22a0350
...
...
@@ -120,6 +120,7 @@ angular.module('sokoApp', [])
}
if
(
getBitsWinOpt
(
'page'
)
==
'inventory'
)
{
openInventoryPage
();
isInventoryActive
()
if
(
getBitsWinOpt
(
'sel'
)
==
"add"
){
$
(
'#spnsrdModal'
).
modal
(
'open'
);
}
...
...
js/inventory.js
View file @
e22a0350
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
=
{}
...
...
@@ -27,12 +43,9 @@ function sponpProdNamesInput() {
var
itemPrice
=
sponProds
[
iii
].
price
;
var
itemId
=
sponProds
[
iii
].
id
;
var
itemIcon
=
sponProds
[
iii
].
icon
;
if
(
itemName
.
toLowerCase
()
==
"eggs"
)
{
$
(
'.inventoryItemsToAdd'
).
append
(
'<form action="#" style="padding-right: 20px;"> <p> <label> <input class="inventoryItems" type="checkbox" pid="'
+
itemId
+
'" id="inventoryItem'
+
itemId
+
'"/> <span><img src="'
+
itemIcon
+
'" style=" width: 25px; height: 25px; object-fit: cover; border-radius: 50%; float: left; margin-right: 10px;">'
+
itemName
+
' @ '
+
itemPrice
+
' per tray</span> </label> </p></form>'
);
}
if
(
itemName
.
toLowerCase
()
==
"potatoes"
)
{
$
(
'.inventoryItemsToAdd'
).
append
(
'<form action="#" style="padding-right: 20px;"> <p> <label> <input class="inventoryItems" type="checkbox" pid="'
+
itemId
+
'" id="inventoryItem'
+
itemId
+
'"/> <span><img src="'
+
itemIcon
+
'" style=" width: 25px; height: 25px; object-fit: cover; border-radius: 50%; float: left; margin-right: 10px;">'
+
itemName
+
' @ '
+
itemPrice
+
' per kg</span> </label> </p></form>'
);
}
var
itemMetric
=
sponProds
[
iii
].
metric
;
$
(
'.inventoryItemsToAdd'
).
append
(
'<form action="#" style="padding-right: 20px;"> <p> <label> <input class="inventoryItems" type="checkbox" pid="'
+
itemId
+
'" id="inventoryItem'
+
itemId
+
'"/> <span><img src="'
+
itemIcon
+
'" style=" width: 25px; height: 25px; object-fit: cover; border-radius: 50%; float: left; margin-right: 10px;">'
+
itemName
+
' @ '
+
itemPrice
+
' '
+
itemMetric
+
'</span> </label> </p></form>'
);
if
(
invetoryItemsInStore
.
includes
(
itemId
)
==
true
)
{
$
(
'#inventoryItem'
+
itemId
+
''
).
attr
(
'checked'
,
true
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment