neel / bong

1 stars 0 forks source link

Project creator doesn't include css and js in generated Layout #7

Closed neel closed 12 years ago

neel commented 12 years ago

a generated Layout should have

<head>
    <script type="text/javascript" src="/bong/~bong/sys/rc/js/jquery"></script>
    <script type="text/javascript" src="/bong/~bong/sys/rc/js/dump"></script>
    <script type="text/javascript" src="/bong/~bong/sys/rc/js/bong.bootstrap"></script>

    <style type="text/css">
        @import url("/bong/~bong/rc/css/style");
        @import url("/bong/~bong/sys/rc/css/dump");
    </style>
</head>

for rendering the dump window and initial styling where as it includes none of them

neel commented 12 years ago

Putting the following in params brings the CSS'

$params->js = array(SysResource::js("jquery"), SysResource::js("dump"), SysResource::js("bong.bootstrap"));
$params->css = array(Resource::css('style'), SysResource::css("dump"));

The params file will be located at /bong/projects/{PROJECT_DIR}/usr/local/common/layout

neel commented 12 years ago

But this should be auto generated in the params wheneven a new project is created

neel commented 12 years ago

The default template for params is located at /bong/usr/common/template/project/usr/local/common/layout/params.php There you can put those 2 lines However Its not yet tested. I am keeping these two lines there. and the issue will be closed after further testing. however I think It will resolve the issue.

neel commented 12 years ago

Nope Not resolved the header part is still not getting the proper CSS. The problem was in Resource::css('style') its taking the css of admin project not from bong system. So I merged the header and other related parts from that CSS to /bong/usr/share/css/bong.css which holds the CSS for showing up the dialogs. Then I tested it by changing in some project /bong/projects/{PROJECT_DIR}/usr/local/common/layout/params.php which seems to work. So Now I'm planning to apply that change /bong/usr/common/template/project/usr/local/common/layout/params.php too. It should be fixed now.

neel commented 12 years ago

Hmm Fixed and Tested