Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

editing a bootstrap template, changing the jarvisWidget header text

Does anyone have experience using jarvisWidgets in a bootstrap template. I'm using a theme from https://wrapbootstrap.com/ and the widgets are pretty simple, however I can't seem to change the headings, and if I use them on different pages they get changed based on what was already in the template - some css overwriting must be going on - but I don't know where to look.

this is strange and seems so simple - I cannot seem to change the header (title) of a chart widget.

looking at the /smartAdmin/DEVELOPER/AJAX_version/#ajax/morris.html file

line 60

<header>
    <span class="widget-icon"> <i class="fa fa-bar-chart-o"></i> </span>
    <h2>Sales Graph</h2>           
</header>

one would think that I could change the text "Sales Graph" to "Anything I like" - and that would be that. However this is not the case!!!!

I can REMOVE the H2 tags, and the text will not show. (as expected) I can REMOVE the 'widget-icon' SPAN, and the icon will not show (as expected)

HOWEVER

if I change < h2>Sales Graph to < h2>My Graph - the text remains "Sales Graph" on the rendered page

if I implement this graph widget on the dashboard.html page - the text renders as "Live Feeds" (!) regardless of what I text I type.

like image 897
j-p Avatar asked May 22 '14 03:05

j-p


3 Answers

JarvisWidgets uses HTML5 LocalStorage. Each time you reload your page, it will get settings from LocalStorage for each widget specified by their unique id attribute. So make sure you do so for each widget. i.e.

<div class="jarviswidget" id="wid-id-0">

Also, you can call the method localStorage.clear(); to clear the storage and reload your HTML changes.

You should check their documentation for more information. :)

Hope that helps.

like image 51
lodev09 Avatar answered Nov 17 '22 05:11

lodev09


UGH - all this new client side stuff....

It uses local storage - and the cache needs to be cleared to see the changes....

Hope this helps someone else.

like image 30
j-p Avatar answered Nov 17 '22 06:11

j-p


Go to the js folder. Go to app.config.js and change the localStorageJarvisWidgets to false. It will turn off the local storage.

like image 1
Rohan Avatar answered Nov 17 '22 06:11

Rohan