Re: [Tiki-users] Displaying a page without any decorations
Ilya Perminov <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.user |
|---|---|
| Message-ID | <CAD63mQYrJp=kLbsvkfnwwQ8Kn+vOkgksKrCHBAFbtJavbd_juQ@mail.gmail.com> |
Hi guys,
Thanks for the links. I tried Plugin Layout and disabled all the extra
parts of my page, but the resulting HTML didn't work out of the box
with bootstrap's modal (or at least its Tiki wrappers). That was not
very surprising and I started looking into tiki-jquery, but I gave up
on debugging this, because in tiki-jquery I found a simple solution to
my main problem - when a new tracker item is added I want to close a
previous one (for some definition of previous). I realized I can just
change the redirect URL of the modal popup to remove an item for me.
My page looks something like
{trackerlist trackerId="4" fields="26:79:25:32:24:23" showtitle="n"
showlinks="y" showstatus="y" status="opc" filterfield="17"
exactvalue="{{itemId}}" ignoreRequestItemId="y" showcloseitem="y"}
{button _id="add-item-button"
href="tiki-tracker-insert_item?trackerId=4&modal=1&forced[statePerson]={{itemId}}"
rel="box" text="Add" _class="click-modal btn-primary"}
i.e. a tracker list and a button to add a new item. In the tracker
list there are buttons/links to close open items. So, with JavaScript
I can grab a "close item" button URL and use it as
modal-submit-redirect-url for the add item modal:
{JQ()}
closeHistoryItemBtn = $("A[href*='closeitem']")[0];
if (closeHistoryItemBtn) {
$("#add-item-button").data('modal-submit-redirect-url',
closeHistoryItemBtn.href);
}
{JQ}
That's all I needed to do. I understand this solution is very hackish
and I'd be happy to learn better ways of doing this.
Regards,
Ilya