01. fixed: code style
02. fixed: php doc
03. fixed: PHP notices
04. new: better functions to list enabled views and view displays
05. new: created %quicktabs wildcard in the menu
06. new: differnt style for different QTabs (still not possible to show different QTabs on the same page, that would require a change in the styles)
07. fixed: invalid XHTML on admin/settings/quicktabs
08. new: create QTabs with quicktabs_render()
09. new: the quicktabs preview changed from hardcoded to quicktabs_render() function
10. new: less tab data saved into db
11. new: node, block and view can be a tabpage for ajax and non ajax tabpages also
12: fix: removed code duplication (there is absolutely no difference between ajax and non ajax QTabs admin interface, just a single flag)
13. fix: hook_quicktabs_tabstyles() moved back to the module file
14: fix: QT db insert for postgresql
15: fix: t() calls removed from schema descriptions #332123: Remove t() from all schema descriptions
and other small changes
I did not make some changes for a reason to have smaller (more readable) patch
todo:
01. please fix the indentation in hook_menu
note:
The ajax views inside ajax quicktabs does not seems to work, but I did not change that. It does not either work for me without this patch.
| Comment | File | Size | Author |
|---|---|---|---|
| #56 | quicktabs_redierct_339481-56.patch | 993 bytes | pasqualle |
| #39 | quicktabs_unify_tabs_339481-39.patch | 35.9 KB | pasqualle |
| #36 | quicktabs_notices_339481-36.patch | 2.34 KB | pasqualle |
| #35 | quicktabs_render_tabpage_339481-35.patch | 5.63 KB | pasqualle |
| #32 | quicktabs_notice_339481-32.patch | 1.4 KB | pasqualle |
Comments
Comment #1
pasqualleThe patched module can be downloaded from here:
EDIT: download location removed, use the latest release
Comment #2
katbailey commentedHi Pasqualle,
thanks for this - I look forward to reviewing ;-)
Regarding the ajax views not working - did you clear your cache? I have it working pretty well on my demo site: http://64.55.119.4/
Katherine
Comment #3
panji commentedwow,.. nice news... thanks,... is the patch already included on the latest dev release?
Comment #4
pasqualle@panji: no, it's not (yet). If you would like to test the patch you can (apply the patch to the latest dev version or) download the patched version from my site..
Comment #5
katbailey commentedThis is far too much for just one patch and should be divided up into separate issues as follows:
- issues 1 through 5 and issues 7, 13 and 15 can probably be lumped together as one patch
- number 6 is a feature that has been requested here: http://drupal.org/node/330042 - please submit a patch to this thread
- 8 and 9 can go together
- 10, separate patch
- 11, separate patch
- 12, separate patch
- 14, this is a bug that has been reported here: http://drupal.org/node/329582 please submit a patch to this thread
I realise that you can't create all these separate patches at once because there is overlap and you'd end up patching against old code that is (hopefully) about to be changed by another patch. But changes like this have to be done piecemeal and if you can break them down like this, start with a couple that are sensible to start with, I will try to keep up by reviewing and committing so that you can roll further patches against updated code from cvs.
thanks,
Katherine
Comment #6
pasqualleOK, the first patch
This is PHPdoc and code style fix only, no functional changes.
Please commit, because I can not continue rolling patches without this. Thanks.
Comment #7
panji commentedGreat work Katbailey and Pasqualle, the full patched version work fine for me, but we should delete all previous QT block, and creating new one...
anyway QT is a must have module...
thanks..
Comment #8
katbailey commentedPhew - that one was easier!
Committed.
Looking forward to the next
thanks,
Katherine
Comment #9
pasquallethis patch is
04. new: better functions to list enabled views and view displays
Comment #10
pasqualleplease commit the previous patch in #9 before this, otherwise I'll have to reroll this patch. Thanks..
a) this patch uses
$form_state['clicked_button']in validation and submit handler to determine the clicked buttonb) php notice fix: adds validation to check at least one tab is created
Comment #11
pasqualleplease commit patch #9 and #10 first
this patch does this: #338021: quick tab edit link is on wrong place
I rather made the patch here, because I fear the commit sequence will be mixed, and I'll have to reroll all my patches..
Comment #12
pasquallethis patch does not depends on previous patches, commit anytime
this patch improves the theme_quicktabs_tabs() function
a) fix php notice and code style
b) add first and last class (note: $index and $i does not have to be equal. This change is not included in my downloadable package (yet), and I think that is why my ajax views does not work inside ajax tabs)
c) removes views module warning (it can't be displayed here, not enough space)
d) uses the drupal_attributes() function
Comment #13
pasqualleplease commit this patch after #12
a) this patch add missing file parameters in hook_theme
b) code style and translation string fixes in hook_menu
Comment #14
pasqualleno more possible patches for now..
Comment #15
pasqualleI have made the noted changes #12 in my release on my site and also changed the version string, so people using my release are always warned that they are not using the recommended version..
Now the ajax views inside ajax quicktabs works, but only if the view is on the first tab and there are no other views on the page. Will try to investigate it later with a new issue after this one is fixed..
Comment #16
katbailey commented#9 committed
Comment #17
katbailey commented#10 committed
Comment #18
katbailey commented#11 committed
Comment #19
katbailey commented#12 committed
Comment #20
katbailey commentedAfter applying the patch in #13 I get the following error on every page:
"warning: array_merge_recursive() [function.array-merge-recursive]: recursion detected in /Applications/MAMP/htdocs/drupal-6.6/includes/common.inc on line 2076."
Comment #21
pasquallecan you try to delete the theme cache?
Comment #22
katbailey commentedI'm using devel module and running devel/cache/clear but still getting the error.
Comment #23
pasqualleI tried the CVS version + patch#13 on a fresh drupal6-dev install and I do not see the that warning..
Comment #24
pasqualleIf you can find the problem then you can move the quicktabs_quicktabs_tabstyles() function from the admin.inc file to the .module file. Hook implementations should be in the .module file. I can not make a proper patch for that now..
Comment #25
katbailey commentedOK, #13 committed - the error went away after I deleted one of my qt blocks, I did more testing, creating more blocks with multiple ajax views (which I had assumed was the problem) and couldn't reproduce it.
Comment #26
katbailey commented#24 done
Comment #27
pasquallethis patch creates a %quicktabs wildcard (replaces 3 db queries with 1)
menu rebuild is required, which can be done by visiting admin/build/modules and clicking on the 'Save configuration' button.
Comment #28
panji commentedyess.... it's getting better and better.. keep up the great work..
Comment #29
katbailey commented#27 committed
Comment #30
pasquallethis patch moves some code from quicktabs_block() function into new functions: quicktabs_render() and quicktabs_ajax_render()
this will allow to create quicktabs with some php code, without using the blocks functionality or without storing them into db (for non ajax quictabs)
please fix the indentation in the new functions after applying the patch (I did not fix that for the reason to have the patch small and reviewable)
Comment #31
pasquallethis patch fixes postgresql db insert
Comment #32
pasqualleplease commit after #31
this patch fixes php notices in qt_more_tabs_submit() and qt_remove_tab_submit()
Comment #33
katbailey commented#30, #31, #32 committed
Comment #34
pasquallethis patch creates a new function quicktabs_render_tabpage() for general tabpage rendering, which opens the possibility to dynamically create tabpages, and to have one theme function for the tabpages later. The code is moved from the functions quicktabs_render() and quicktabs_ajax_render().
and also this patch adds a quicktabs_ajax_block() function and quicktabs/ajax/block menu callback, which is a preparation (for the next larger patch) to have all tab types (node, block, view) for ajax and non ajax quicktabs..
Comment #35
pasqualleand the patch
Comment #36
pasquallethis patch
1. removes a comment and an unused variable from quicktabs_settings_submit()
2. small code style changes and php notice fixes
Comment #37
katbailey commented#35 committed. There was a slight problem which was due to the fact that the id for the node/block/view in a tab page has a different key depending on whether it's an ajax QT or non-ajax. This is because originally the key was 'bvid' - b for 'block' and v for 'view', because it could be an id of either type. Then with ajax QTs I obviously got confused - logically it would have been nvid - n for 'node' and v for 'view' because it could be the id of either a node or a view, but I got mixed up and did bnid :-P Anyway, clearly the key should be the same no matter what. For now I've added in a fix (lines 424 to 429) but once the tab rendering functionality is finalised (i.e. after the larger patch you mentioned above which allows ajax blocks etc) we can think about whether it will be possible to change this without breaking people's existing QT blocks.
Comment #38
katbailey commented#36 committed
Comment #39
pasquallethis patch
1. unifies the admin interface for non ajax and ajax quicktabs
2. changes the format how tabpages are stored + update from the old format (run update.php)
3. fixes some php notices
Comment #40
katbailey commentedHi Pasqualle,
you now have cvs access on Quick Tabs. If you want you can go ahead and commit this patch, it looks great to me though I haven't had a chance to test it and won't until tomorrow night at the earliest.
Katherine
Comment #41
pasqualleThanks, I will do that..
can I finish the other problems mentioned in this issue, or would you like to discuss every change I would like to do in the module?
Comment #42
pasqualle#39 committed
Comment #43
pasquallehttp://drupal.org/cvs?commit=156676
1. last bnid value fixed
2. using the function request_uri() instead $_SERVER['REQUEST_URI']
Comment #44
katbailey commentedYes, I approve of all the changes in this issue so you can go ahead.
In general, if you want to make changes, if they are just fixes - bug fixes, code style, refactoring for efficiency and removing duplication, etc, - then absolutely go ahead and make changes. But certainly anything on the scale of patch #39 I would like to know about in advance ;-)
Comment #45
katbailey commentedoops, replied at the same time as you so overwrote your status change
Comment #46
pasquallehttp://drupal.org/cvs?commit=156681
1. fixed the menu path structure. The breadcrumb and local tasks are displayed correctly now.
2. unified the 'add' and 'edit' quicktabs functions
don't forget to rebuild the menu..
Comment #47
pasqualleThanks again Katherine. I definitely do not plan anything on the scale of this issue, and I will ask you to review every larger feature request before I would commit it.
Comment #48
katbailey commentedNo, THANK YOU!! you've made some amazing changes and totally cleaned up the code, it's wonderful - great to have you on board! :-)
Comment #49
pasquallehttp://drupal.org/cvs?commit=156697
1. fixed views block in quicktab. the views blocks have - (hyphen) in the block id, so I simply changed the ajax quicktab to use 2 --
2. fixed two php notices
Comment #50
panji commentedsome report here:
- it is needed to reset and recreate again the QT block after I update to the latest 6.x-2.x-dev version (4 Dec 08), but it's fine with many change on QT.
- Ajax call on editing QT block especially on creating views tab, make me work slower and sometime made some error.
- I' think it's better to make QT style a little bit narrow on css style and using a little bit smaller font by the default. (minor)
Thanks again for this nice module, Great job,..
Panji
Comment #51
pasquallethe update should be fine from the QT 6.x-1.x (and beta) and 6.x-2.x versions (just run update.php and your blocks should be updated), the only problem is when you used my version from my site (there is no update for that, and I do not plan to make). If you could test the update, that would be a help. If there are remaining problems, I could still fix it and make it easier for others..
@panji: Please create new issues for the the remaining 3. I would like to fix those, but it is outside of this issue. Thanks..
Comment #52
pasquallehttp://drupal.org/cvs?commit=156803
1. node selection changed to inserting node ID into textbox (views uses the same method) instead of selecting it from dropdown
2. teaser and hide title settings for node
Comment #53
pasquallehttp://drupal.org/cvs?commit=156846
the admin form was messed up if the form validation fails, the js and css files have to be added in the theme function..
Comment #54
pasquallehttp://drupal.org/cvs?commit=156850
the permissions changed
only 'administer quicktabs' permission is required to add, edit, delete, clone quicktabs.
menu rebuild is necessary
Comment #55
pasqualle@Katherine: this patch does not work. I would like to change the drupal_goto() to redirect but it sometimes fails, and I do not understand why. Maybe you could help me fix this.
if I just click save, then it works fine
but if I click add tab->save->(validation fail) fill title->save I will be redirected to quictabs/ahah where json data is displayed
Comment #56
pasqualleif I remove the $form['#redirect'] from quicktabs_ahah() it seems working. Is it ok to remove it?
Comment #57
pasqualleI will not make the style selection option in this issue, as it is not a perfect solution yet.
it will be done in #275232: Different styling for different QTabs
Comment #58
katbailey commented@Pasqualle, removing $form['#redirect'] = FALSE prevents this from happening only if the user doesn't add another element to the form - I tried it, it only pushes the problem further down the line.
It is strange that this happens only after a failed validation. I've done some playing around but haven't found a solution so I've asked chx for help as he might have come across this before.
Comment #59
katbailey commentedComment #60
pasquallehttp://drupal.org/cvs?commit=157382
style settings cleanup:
fixed invalid XHTML on admin/settings/quicktabs
the quicktabs preview changed from hardcoded to quicktabs_render() function
theme function prepared for the different style per QTabs functionality
you need to reset your default style and clear the theme cache..
Comment #61
panji commentedthink it would be better if it is not automatically go back to the list QT display after we save on edit or create QT block IMHO
Comment #62
pasqualleaddition to #55
I can display json data with the current code also.
click add tab->click save->(validation fail, but just leave it like that)->click save again
results in a redirect to quictabs/ahah where json data is displayed
Comment #63
pasqualleThe remaining issue is summarized here:
#350102: Submit of a form that has been loaded with ajax posts to the ajax callback URL