[llvm-commits] [LNT] r161842 - in /lnt/trunk/lnt/server/ui: static/v4_global_status.js templates/v4_global_status.html

Daniel Dunbar daniel at zuster.org
Thu Aug 16 10:29:06 PDT 2012


On Mon, Aug 13, 2012 at 9:21 PM, Michael Gottesman <mgottesman at apple.com> wrote:
> Author: mgottesman
> Date: Mon Aug 13 23:21:11 2012
> New Revision: 161842
>
> URL: http://llvm.org/viewvc/llvm-project?rev=161842&view=rev
> Log:
> [LNT] v4_global_status: Added basic, bare javascript file I am going to file it in over the next commits.
>
> Added:
>     lnt/trunk/lnt/server/ui/static/v4_global_status.js
> Modified:
>     lnt/trunk/lnt/server/ui/templates/v4_global_status.html
>
> Added: lnt/trunk/lnt/server/ui/static/v4_global_status.js
> URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/static/v4_global_status.js?rev=161842&view=auto
> ==============================================================================
> --- lnt/trunk/lnt/server/ui/static/v4_global_status.js (added)
> +++ lnt/trunk/lnt/server/ui/static/v4_global_status.js Mon Aug 13 23:21:11 2012
> @@ -0,0 +1,22 @@
> +// -*- mode: javascript; -*-
> +
> +v4_global_status = {};
> +(function(_module) {
> +    // Assign our input module to a var so that a closure is created
> +    // in our local context.
> +    var m = _module;

Regarding the module definition stuff, I do not want to introduce another
JS-meta-style.

I think I understand the motivation for capturing everything under this
function, but I think it is overkill for what we are doing here. Are you morally
opposed to styling this code more like v4_summary_report_ui.js? I don't see any
value in structuring "page-specific" JS files in this way.

Also, why not just call the parameter m? I forget if I am missing some JS
stupidity here.

 - Daniel

> +
> +    /* Globals */
> +    var g = {};
> +
> +    /* Initialization */
> +    $(document).ready(function() {
> +        // Create a global variable for table.
> +        g.table = $('#data-table')[0];
> +    });
> +
> +    /* Helper Functions */
> +
> +    /* Exported Functions */
> +
> +})(v4_global_status);
>
> Modified: lnt/trunk/lnt/server/ui/templates/v4_global_status.html
> URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/templates/v4_global_status.html?rev=161842&r1=161841&r2=161842&view=diff
> ==============================================================================
> --- lnt/trunk/lnt/server/ui/templates/v4_global_status.html (original)
> +++ lnt/trunk/lnt/server/ui/templates/v4_global_status.html Mon Aug 13 23:21:11 2012
> @@ -23,6 +23,9 @@
>          <script language="javascript" type="text/javascript"
>                  src="{{ url_for('.static',
>                       filename='jquery/jquery.formdefaults/jquery.formdefaults.min.js') }}"></script>
> +        <script language="javascript" type="text/javascript"
> +                src="{{ url_for('.static',
> +                     filename='v4_global_status.js') }}"></script>
>
>          <style type="text/css">
>            {# Generate css classes to show/hide groups and machines #}
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list