HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


v 6.1 - contexctual CSS editor problemsv

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#68443 (In Topic #14543)
Avatar

Community saint

Here are the issues I am having with the contextual CSS editor (using firefox):

1)The contextual CSS editor opens in a new tab and not a new window (the help notes implies that it is supposed to open in a new as it talks about changing windows with alt-tab).

2) The selectors don't lock when switching windows. You only see the highlights for a brief moment when you first switch.

3) Making a live change to the css takes about 5-seconds before the change is reflected on screen (Note that this is while running on a shared server, and not a local install. Doing the same in firebug is instantaneous).

4) When I change pages, I have to close and re-open the contextual CSS editor if I want the selector to work on the new page (It still works from withing the CSS editor, but not within my page)

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68451
Avatar

Community saint

5) Does not work properly with iframes (for example with Poll archive page).

(note that other tools like "Show template edit links", and "Template names as HTML comments" have never worked properly with iframes either.)

And while I know you can use :set_value('no_frames','1'); to temporarily work around this problem, I just keep forgetting to use it.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68452
Avatar

Community saint

6) Clicking "Save and Stay" on the contextual Edit CSS page opens a new window.

I tried this on the normal Edit CSS page and it also opening a new window now.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68472
Avatar

Working through these now.

1-

Yeah most modern browsers are sending 'new windows' as 'new tabs'. Chrome actually does a popup for forms still which I think's nice. I've made a change to force a new window that works on Firefox. In FOOTER.tpl the <select> line needs to change to….

Code


                  <select {+START,IF,{$HAS_JS}}onchange="if (this.options[this.selectedIndex].value!='view') { var test=window.open('','ocp_dev_tools'+Math.random(),'width=950,height=700,scrollbars=yes'); if (test) this.form.setAttribute('target',test.name); this.form.submit(); }" {+END}id="special_page_type" name="special_page_type">


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68474
Avatar

2- You're right. I have the luxury of Expose on the Mac which turns off JS events whilst you switch. I am amending it to if you hold down the ctrl key things lock, which gives you a chance to get off the window with your mouse cursor.
Attachment
» Download: JAVASCRIPT_THEMEING.tpl (10 Kb, 144 downloads so far)



Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68475
Avatar

3- The code waits 3 seconds before changing it, for performance reasons. I'll change that to 2. It has to do an AJAX request for the server to recompile the CSS file, which takes some time. I suppose in theory it could deduce whether a change involved Tempcode or not, but practically it would be very hard to do.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68477
Avatar

4- never considered that as a feature to aim for but actually yeah, and it is possible with some wizardry.

Attachment
» Download: JAVASCRIPT_THEMEING.tpl (10 Kb, 149 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68478
Avatar

5- That won't be supported. However using Firebug should work pretty well.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68479
Avatar

6- So it's this silly thing from before, clearly the fix I was not certain about didn't work.

Actually though, you were talking about 'no_frames' in 5, so maybe you've put that on and now it doesn't work. The feature works through frames, in THEME_EDIT_CSS_SCREEN…

Code


{+START,IF,{$NOT,{$VALUE_OPTION,no_frames}}}
   <iframe name="save_frame" id="save_frame" title="{!SAVE_AND_STAY}" frameborder="0" marginwidth="0" marginheight="0" style="width: 100%; height: 0px" scrolling="no" src="{$BASE_URL*}/data/index.html">{!SAVE_AND_STAY}</iframe>
{+END}
You can just remove the IF…END directive and leave the frame if you want.

I think I'll actually change it to…

Code


{+START,IF,{$NEQ,{$VALUE_OPTION,no_frames},2}}
   <iframe name="save_frame" id="save_frame" title="{!SAVE_AND_STAY}" frameborder="0" marginwidth="0" marginheight="0" style="width: 100%; height: 0px" scrolling="no" src="{$BASE_URL*}/data/index.html">{!SAVE_AND_STAY}</iframe>
{+END}

So if people REALLY REALLY don't want frames, they can set it to '2'.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68497
Avatar

Community saint

1 - Fixed

2 - The ctrl key does nothing for me

3 - Waiting 4 seconds is better then waiting 5 seconds

4 - No difference. You need a stronger spell.

5 - I guess I always knew that was going to be the answer

6 - Yea the no_iframes was the culprit for the CSS editor problem, but not for the template editor. I haven't used the template edit much since you did the last 'uncertain' fix. Look like the cure was only temporary.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68499
Avatar

Community saint

Correction. #2 actually does work. There was a second contextual editor window open that was stealing the ctrl key.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68500
Avatar

6- I just realised there were too code branches, one for the template editors with a preview option, and one without. The ones with preview failed.

Attachment
» Download: TEMPLATE_EDIT_SCREEN.tpl (2 Kb, 154 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68501
Avatar

4- works for me on Chrome and Firefox, so not sure what's going on, but I suspect whatever is missing will update for you in the next release.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68502
Avatar

Community saint

6 - fixed now.

4 - Just had another play and it actually does work (must have not worked before because of the second contextual window problem I had with #2).

Now I get the following error navigating between pages while the contextual editor is up.

    55: window.opener.findActiveSelectors is not a function
    …/themes/default/templates_cached/EN/javascript_themeing.js

Apologies for not properly checking #2 and #4.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68504
Avatar

Speculative fix. Could well be a timing issue, or if the staff login is lost.

Attachment
» Download: JAVASCRIPT_THEMEING.tpl (10 Kb, 160 downloads so far)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68505
Avatar

Community saint

Status update:

1 - Fixed
2 - Fixed
3 - As Fixed as it is going to get
4 - Fixed
5 - Closed
6 - Fixed

As you have done so well with 1 - 6, I thought I'd throw in a couple more.

7 - Got the following error when contextual editing the forum page. Only on first time entering the page.

    56: a is null
    …/themes/default/templates_cached/EN/javascript_themeing.js

8 - Got the following error trying to run the contextual editor in IE8

    Message: Invalid argument.
    Line: 1606
    Char: 55
    Code: 0
    URI: …/site/pg/start

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68506
Avatar

Fixed.

Attachment
» Download: JAVASCRIPT_THEMEING.tpl (10 Kb, 151 downloads so far)
Attachment
» Download: JAVASCRIPT_STAFF.tpl (14 Kb, 154 downloads so far)
Attachment
» Download: FOOTER.tpl (5 Kb, 150 downloads so far)


I am attaching JAVASCRIPT_STAFF and FOOTER because I moved the window.open etc JS code out of the FOOTER because it was bloating up the output. You'll see I've moved it into a new function in JAVASCRIPT_STAFF.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68507
Avatar

Oh, forgot to say these incorporate making it open up faster.

I have to say, these little improvements are very nice, so thanks for suggesting them. It's great to have it stay open and adapt itself to whatever page you happen to be on and keep working away.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#68508
Avatar

Community saint

I'd love to test out these new changes, I really would, but you seem to have taken out the dropdown list with all the admin tools on it.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#68527
Avatar

Nope, it's there for staff as long as the template isn't changed and the 'Page Actions' option is on.
It is:

Code


                  <select {+START,IF,{$HAS_JS}}onchange="return staff_actions_select(this);" {+END}id="special_page_type" name="special_page_type">
                     {STAFF_ACTIONS}
                  </select>


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Expand