-
-
Notifications
You must be signed in to change notification settings - Fork 3
yss js functions mApp
mApp is a helper from oiyshTerminal family - Main class
This one is helping with holding mobile look of your site. Powerd by jQuery Mobile is nice for fingers gui. Fast Big Buttons is what I need when I'm writing. I don't wast to do back button! This class is doing all for you. In area of simple gui for mobile. use in: yss-otdm, yss-packitso, yss-multisvg
Kind: global class
-
mApp
-
.appFrame ⇒
string
-
.makeNiceList ⇒
string
-
.lvElement ⇒
string
-
.lvBuild ⇒
string
-
.appFrame ⇒
function returns Basic Frame of a page. if needed back or goTo button is there to use
Kind: instance namespace of mApp
Returns: string
- to put it for example as $('#htmlDyno').html( returnStr )
;
Param | Type | Description |
---|---|---|
args | json |
to set up thinks in frame. |
Properties
Name | Type | Description |
---|---|---|
args | json |
The default values for frame arguments |
args.goTo | string |
if set then past to pager.goToByHash(goTo) to move without reloading |
args.backButton | string |
if set then past to onclick="backButton"
|
args.title | string |
to put page header title |
args.content | string |
to put your content in frame |
Example
$("#htmlDyno").html( mApp2.appFrame({
"content":"Hello world",
"goTo": "pager.goToByHash('pageByName=test functions')"
}) );
will put in htmlDymo div html element App Frame with Hello world in it. bonus go to button to go to test functions page.
wraps data with rule key: <b>val</b></br>
fast !!
Kind: instance namespace of mApp
Returns: string
- ready to put in your div or other place
Param | Type | Description |
---|---|---|
data | dict |
expect dict of keys: vals |
Properties
Name | Type | Description |
---|---|---|
data | dict |
|
data['key' | string |
key is a name to use as description of a value |
data.key | string |
value to display strong |
to make your stuff in lightning speed wrap your data to nice stuff.
Kind: instance namespace of mApp
Returns: string
- to put it for example as $('#htmlDyno').html( returnStr )
;
Param | Type | Description |
---|---|---|
head | string |
set head of list view item |
content |
string | json
|
if {string} then put as content of item |
link | string |
[''=DefultValue] - not set link at all or if set put <a href="#" noclick="link"... over all item |
Properties
Name | Type | Description |
---|---|---|
content | object |
set more custome things like |
content.img | string |
url for image to put on left of item |
content.content |
string | dict
|
put it as content or if {dict} set do automaticly a list of parameters in item. it will make key: <strong>value</strong>
|
content.tip |
string | dict
|
set head tip cloud in right top corner of item |
content.class | string |
set extra class at <h2 class=".. try ui-body-b
|
content.content | object |
if is dict then do expect that is a {"key":1,"index":23} |
content.content | dict |
if dictionary then use rule key: <strong>val</strong><br>
|
content.tip | dict |
if dictionary then use rule key: <strong>val</strong><br>
|
Example
tr+= this.app.lvBuild({
"header": "files in directory:",
"headerTip": items.length,
"items": items
});
A fast way to get consistance look
Build in easy way list view customizable and fast touch freandly!
Kind: instance namespace of mApp
Returns: string
- to put it for example as $('#htmlDyno').html( returnStr )
;
Param | Type | Description |
---|---|---|
data |
string | json
|
if {string} directly element in frame of list view |
Properties
Name | Type | Description |
---|---|---|
data | object |
if {json} set up thinks in list view to build |
data.header | string |
sets header of list view |
data.headerTip | string |
sets header tip / noti info |
data.items |
string | array | json
|
array of Objects mApp.lvElement to list view |
data.searchOn | bool |
[true=DefaultValue] |