I'm using this theme as my admin theme, which is perfect, except when it comes to the Views UI.

The Add Display drop down becomes a series of buttons that look awful and run into and under the Edit View Name Description on the right side.

Also, as you can see, many other elements in the Views UI look very bad.

Is there any way to simply omit the Views UI form from being processed via twitter bootstrap?

Comments

natted’s picture

This is relatively untested (and definitely not a proper fix) as I'm looking at rewriting a lot of this but you could try:

Add:

  if (strstr($element['#submit'][0], 'views_ui')) {
    $whitelist[] = $element['#id'];
  }

right after the following code in includes/modules/form.inc

  // Prepare input whitelist - added to ensure ajax functions don't break
  $whitelist = _twitter_bootstrap_element_whitelist();

I'll see if I can do something better as a patch.

tchopshop’s picture

Hi,

I think I fixed it. There is a function in form.inc to ignore specific forms already, but it wasn't working. I think it was because logic to include that code isn't correct.

I added 'views_ui_edit_form' to the function twitter_bootstrap_form_alter then in the function twitter_bootstrap_button line 248-ish, I changed it from if (in_array($element['#id'], $whitelist)) to NOT be in the array if (!in_array($element['#id'], $whitelist)

I don't exactly know what i'm doing, but the view_ui_edit_form is working now. I hope I didn't mess up something else.

andregriffin’s picture

Project: Twitter's Bootstrap » Bootstrap Framework
andregriffin’s picture

Project: Bootstrap Framework » Twitter's Bootstrap
natted’s picture

Project: Twitter's Bootstrap » Bootstrap
frankbaele’s picture

StatusFileSize
new607 bytes

i made a patch of it, its a quick win from natted but looking at it's the 2x i will not investigate any further

frankbaele’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, views_ui.patch, failed testing.

frankbaele’s picture

Status: Needs work » Needs review
StatusFileSize
new636 bytes
natted’s picture

I'll see if I can make some further improvements. There are still some issues with the ui, so it'd be nice to get views looking and working well before we close this.

frankbaele’s picture

Assigned: Unassigned » frankbaele

ok i will update this patch and for views as a whole, assigning to me

frankbaele’s picture

Status: Needs review » Needs work
natted’s picture

Status: Needs work » Needs review

Feel free to post any changes to the patch back here and I'll see if I can add to it.

One thing for others also to be aware of is that #1494860: Views Rewrite Results UI Broken using JQuery 1.7 is still an issue if using ctools 1.2 as the fix is only in 1.x-dev currently. The patch works though, in case anyone needs to use it.

frankbaele’s picture

Status: Needs review » Needs work
boban_dj’s picture

For some clearity regarding the issue on http://drupal.org/node/1494860 , the patch under #30 worked for the rewrite result issue in Views, for me.
Views version = "7.x-3.5" and jQuery Update version = "7.x-2.3"module only work for me under choosing jQuery 1.7 as version in the jQuery module. If you choose jQuery version 1.8 Views breaks.

bryancasler’s picture

Version: 7.x-2.x-dev » 7.x-3.0
Issue summary: View changes

Still a problem in Bootstrap 7.x-3.0

frankcarey’s picture

To clarify, views seems to functionally work fine, but it looks like the views dropdown for the add it getting altered by some JS and "popping out" of the dropdown as is shown in the screenshot.

frankcarey’s picture

I just posted a simple patch to views over at #2402655: admin js breaks when using button elements instead of input. that resolves the issue. The problem was the views js couldn't find the buttons because it was looking for input elements. The overridden theming of the buttons in the views UI is still a little annoying, but acceptable IMO.

markhalliwell’s picture

Version: 7.x-3.0 » 7.x-2.x-dev
Assigned: frankbaele » Unassigned
Status: Needs work » Closed (won't fix)

As @frankcarey stated above, the issue really isn't with Bootstrap but rather the Views JS. Granted, it also probably has something to do with the minimum jQuery requirement of 1.9 too, but like he said, while annoying it's acceptable.

FWIW, this base theme is not meant to be an administrative theme (yet), it is a base-theme. There are bound to be some issue with administrative pages/modules. This happens with other themes too because not every module maintainer is a JS wizard and understands the finesses of jQuery backwards compatibilities.

Regardless, I'm going to pick and choose my battles here. If you want/need views UI to be fixed, please create a new issue and upload a new patch, I will happily commit it (if it's acceptable). I do not have time to focus on issues that don't really pertain to this codebase right now.

Status: Closed (won't fix) » Needs review

Status: Needs review » Needs work

The last submitted patch, 9: views_ui-1834688-1.patch, failed testing.

markhalliwell’s picture

Status: Needs work » Closed (won't fix)