nnmware / devoops

DevOOPS Bootstrap 3 Admin theme
GNU General Public License v3.0
852 stars 416 forks source link

bug with paths in plugins #27

Closed briansol closed 9 years ago

briansol commented 9 years ago

Hi,

I noticed today after trying to use a default glyph that because the bootstrap css file is located in the /plugins/boostrap/ folder, the relative paths within the bootstrap.css that points to ../fonts is thus not referenced correctly. They would need to be changed to ../../fonts/ inside the bootstrap.css file

From a forward-compatibility issue, changing the core boostrap file is a mistake.

From a structure point of view, having 2 source areas at different levels will always cause problems.

I'm not sure what the solution is. It seems like so long as the plugins are broken out in their own folders, there will always be problems.

devoopsme commented 9 years ago

Thanks for issue! We solve this in next few day.

devoopsme commented 9 years ago

Fixed in 1745d784f6813e47adcd65cad65d77b77e657809 Thank you for attention!

Omi004 commented 9 years ago

Hi Guys,

Great job and thanks for providing an awesome theme.. I am using this theme in my PHP project and i am unable to handle a scenario wherein if you open a sidebar link in a new tab or new window then it doesn't load the required css and js and the whole view is distorted.As, when you open it in new tab or window,the # is not appended to the url.

Please help me as i have to rectify this issue or else i have to change the whole approach of displaying pages.

Thanks, Omi

briansol commented 9 years ago

@Omi004, I came up with a way to rectify this.

1) prefix your links with the main container, probably index.html. So if you had <li><a class="ajax-link" href="#page.html">Page</li> you would change these links to <li><a class="ajax-link" href="index.html#page.html">Page</li>

this solves the right-click new tab/window problems as it conatins the full url. but this breaks the shortcuts that DOM-load into the ajax Div, so

2) change the JS that handles that dom-add to remove the index.html from the href by finding var url = $(this).attr('href'); and replacing it with var url = $(this).attr('href').replace('index.html#','');

so now your dom-clicks strip the added prefix.

the urls are a little "uglier" on hover in the status bar, but at least it functions this way instead of just showing the bad 'inner' page with no headers or js/css and it doesn't make it into the url anyway.

Omi004 commented 9 years ago

Thank you for replying. i will try this out. I have some how managed to fix it using redirects earlier,but the problem there is,i have to fix it in all the content pages,for ex:

in forms_layouts.html, i have added following code.

function onBeforeRequest(){ if (location.href=="http://localhost/devoops/ajax/forms_layouts.html") { location.href = "http://localhost/devoops/#ajax/forms_layouts.html"; } }

$(document).ready(function() { //alert("2") onBeforeRequest(); ......

it just solves the problm but ,it increases the manual work which is against standard practice. :smile: :+1:

Regards, Omi

briansol commented 9 years ago

Well, it could be a one-time change if you server-side your menu and print links from php like $scriptroot = "index.html#"; <A HREF="'.$scriptroot.'"page">click</a>

Surely, doing a client side re-direct on every page load should be considered a far worse standard practice.

jjones624 commented 9 years ago

Just a fantastic template, really sweet! I have downloaded both the first version and V2, and without making any changes to any code, in V2 I'm seeing that the menu collapse button (the 3 horizontal lines), will not collapse when the web page is set to a smaller size (anything smaller than a standard desktop size). In the first version it works fine. Any ideas what is happening? It's on Win 8.1 with Chrome.

Thanks, Jeff