REF: My Startup.html for Bootstrap & FontAwesome

Contains tips for configurators working with Aware IM
Post Reply
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

REF: My Startup.html for Bootstrap & FontAwesome

Post by Rennur »

This is my Startup.html file.
Download Bootstrap, FontAwesome & jQuery separately.

AwareIM ver5.8

My changes are in blue, originals are in orange.

* Always backup original files beforehand.
* Please note: ver 5.9 will have an addition, link to gantt chart .css.
* Do not completely replace v5.9 startup.html with your amended version until you add any extras from it.

Any recommendations or comments are welcome.
  • <!DOCTYPE html> <!-- HTML5 specification, my choice, does not need to be changed -->
    <html lang="en">
    <head>
    <link rel="stylesheet" type="text/css" href="ext-4.1.0/resources/EdgeUXBlueBay/resources/css/bluebay.css" id="bas_cur_theme">

    <!-- NOTE:
    These are removed from my startup.html but you can leave them commented out
    <link rel="stylesheet" type="text/css" href="ext-4.1.0/resources/css/ext-all.css" id="bas_cur_theme">
    <link rel="stylesheet" type="text/css" href="aware_ext/calendar/resources/css/calendar.css">
    <link href="aware_ext/scheduler/resources/css/sch-all.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" type="text/css" href="aware_ext/ext/css/ItemSelector.css">
    <link rel="stylesheet" type="text/css" href="aware_ext/resources/css/blue.css">
    -->
    <link rel="stylesheet" type="text/css" href="aware_ext/resources/css/bluebay-all.css">

    <!-- NOTE:
    bluebay-all.css also imports css files:
    calendar/resources/css/calendar.css";
    scheduler/resources/css/sch-all.css";
    ext/css/ItemSelector.css";
    (IN v5.9) gantt-2.1.10/resources/css/sch-gantt-all.css";

    That's why they are missing from my stratup.html .css links.

    -->
    <link rel="stylesheet" type="text/css" href="fw/def2/style/default.css">
    <!-- CSS SEPARATOR. Don't delete -->
    <meta charset="utf-8"> <!-- Charset placed under the CSS separator as it gets removed for some reason -->
    <META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
    <!--mobile device spec (disabled) <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
    <link rel="stylesheet" type="text/css" href="bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="assets/css/font-awesome.css">
    <link rel="stylesheet" type="text/css" href="assets/css/myBluebayReplacements.css">
    <link rel="stylesheet" type="text/css" href="assets/css/AnyCustomCSS.css">


    <!-- Fix for transparent PNG in IE6.0 -->
    <style type="text/css">
    img { behavior: url(aware_ext/resources/css/iepngfix.htc)}
    </style>

    <! Some other stuff I use (not sure if it would be relevant -->
    <script src="assets/js/modernizr-latest.js"></script>

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>

    <script src="assets/js/html5shiv.js"></script>
    <script src="assets/js/respond.min.js"></script>

    <![endif]-->
    <!--[if IE]>
    <script type="text/javascript" src="assets/js/excanvas.compiled.js"></script>
    <![endif]-->

    </head>

    <body><div id="bas_startup_msg" style="text-align: center; padding-top: 200px; ">Loading page. Please wait...</div>
    <div style="visibility:hidden;" id="main_screen" >

    </div>

    <script type="text/javascript" src="ext-4.1.0/ext-all.js"></script>
    <script type="text/javascript" src="aware_ext/aware_full.js?V1814"></script>
    <!-- JS SEPARATOR. Don't delete -->

    <script type="text/javascript">
    Ext.onReady(function(){

    // find the DIV with XML node
    var div = Ext.get ('main_screen');
    if (div == null)
    return;

    var xmlText = "";
    for (var i = 0; i < div.dom.childNodes.length; ++ i)
    {
    xmlText += div.dom.childNodes .nodeValue;
    }
    var xmlDoc = parseXMLDocument (Ext.String.trim (xmlText));
    if (xmlDoc == null)
    {
    alert ('Unable to parse XML');
    return;
    }
    if (xmlDoc.parseError && xmlDoc.parseError.reason && xmlDoc.parseError.reason != '')
    {
    alert ('XML parsing error ' + xmlDoc.parseError.reason + ' on line ' + xmlDoc.parseError.line + ' ' + xmlDoc.parseError.srcText);
    return;
    }


    var startupMsg = Ext.get ('bas_startup_msg');
    if (startupMsg)
    startupMsg.remove ();

    AwareApp.start (xmlDoc);
    });
    </script>


    <script src="assets/js/jquery-1.10.2.min.js"></script>
    <script src="assets/js/jquery-ui-1.10.3.min.js"></script>
    <script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
    <script src="http://platform.twitter.com/widgets.js"></script>
    <script src="assets/js/holder.js"></script>


    </body>
    </html>


Cheers
Gabbitas
Posts: 334
Joined: Sun Jan 03, 2010 3:36 am

Post by Gabbitas »

Hi Rennur,

I would like to integrate bootstrap into my app and in particular I want to create drop down operation menus inside a grid as per your post http://www.awareim.com/forum/viewtopic. ... =bootstrap

Could you, or anyone else, provide some detailed steps on how to integrate bootstrap (baby steps!) please?

Thanks
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

Post by weblike »

Hi Mark,

I will describe how I use bootstrap:

1. Download bootstrap from official site or from link bellow:
https://www.dropbox.com/s/sa7xhcpfrvncf ... p.zip?dl=0

2. Unzip bootstrap folder to:

c:\AwareIM\Tomcat\webapps\AwareIM\

3. I don't use it in startup.html...Either I use a specific .html which I import it in “Banner” section of the Visual Perspective.

In that .html file I enter like this:

<head>
…..
<!-- Bootstrap -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
…...
</head>
<body>
…...
…...
…..
…..
<script src="bootstrap/js/bootstrap.min.js"></script><!-- Put this before enclosing body section-->
</body>

This .html is present in banner section (everywhere in app) and in this case I can use bootstrap code in every form, queries of the app. It works on my apps.

Example of a bootstrap button which fires a process from a form I use:
<button type="button" class="btn btn-primary" onclick="AwareApp.startProcessFromForm ('CreateNewInvoice','main', this, true);">Create new invoice</button>


You can find more examples of bootstrap menus, drop-downs, buttons, toolbars, search fields, on bootstrap official site here http://getbootstrap.com/components/

If you need more info or help, please feel free to contact.

Nice day.
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
robleer
Posts: 285
Joined: Wed Jul 14, 2010 7:01 pm

Post by robleer »

@weblike

I was playing a little with this and ideed, your approach works. But what did you mean with 'i use it with form and queries'?
Did you replace all the css classes to the bootstrap classes?

I'm just curious how far you are and if you have more examples I'd like to try that also and work on it.

Regards,

Rob
Using 8.7 Professional 3025 on MySQL/Windows
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

Post by weblike »

Hi Rob,

Bootstrap is great in many things...It's simple, it's looking great and you cand find a lot of examples, documentation on the web.

In forms and queries mostly I use buttons, modals, dropdown buttons, alerts, badges, etc.
It's very simple: In forms you create a html cell where you can put the code of the button like this:
<button type="button" class="btn btn-primary" onclick="AwareApp.startProcessFromForm ('MarkInvoiceAsPaid','main', this, true);">Mark Invoice as Paid</button>

You can find more resources on bootstrap site: http://getbootstrap.com/components/

thank you
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
robleer
Posts: 285
Joined: Wed Jul 14, 2010 7:01 pm

Post by robleer »

Hi George,

Thanks for your reply. I know what Bootstrap can do and what it is. Your example is a simple button, but what is your idea about displaying grids and other more complex things?
Using 8.7 Professional 3025 on MySQL/Windows
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

Post by weblike »

Hi Rob,

Now I'm trying to create a Dashboard with bootstrap, but what I have not achieved yet is ajax refreshing each element separately (not the entire panel/page): http://www.awareim.com/forum/viewtopic.php?t=7380

As you can see in Support reply from above post, javascripts codes are differently interpreted in AWIM. I have to play a little bit with that, maybe I will open a support ticket to have point of start. I'm not so familiar with Ext JS codes yet, but willing to learn.:)

thanks,
keep in touch..
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
weblike
Posts: 1165
Joined: Sun Dec 02, 2012 12:00 pm
Location: Europe

Post by weblike »

Hi,

Henrik has made a Feature request about refreshing the frames&contentpanel in visual perspectives... This would be great feature and would solve many problems with dashboards like I mentioned above.
http://www.awareim.com/forum/viewtopic.php?t=7310


thank you..
Nice day
Thx,
George
________________________________
Developer Edition
AwareIM: v8.5, build 2824
OS: Windows Server 2012
DB: MySql 5.6.42
Post Reply