+ Reply to Thread
Page 6 of 15 FirstFirst ... 4 5 6 7 8 ... LastLast
Results 51 to 60 of 147

Thread: ANNOUNCE: TSTable() template, sortable/filterable table generator

  1. #51

    Default

    Right, looks perfect on your testpage. It's the way we would like to have it.
    I followed your instructions again. Just instead of creating a new template, in the source view I selected all old code and replaced it with the actual one. The I replaced the links for the external files to internal links.

    Again the same behaviour: The table looks all the same. Only the additional white space before. No error messages.

    If I set the link tablesorter_uri to a wrong link, nothing is changed. No error message.

    A few thoughts:
    - Could it be a style sheet problem, since out wiki is customized (colors, viewing width). Im not sure if there are some special styles for tables in our setup.
    - Is the java stuff running in the clients browser or on the wiki server? Might it be possible that the code isn't executed or found on the server? I put the additional files as attachment on the TSTable template. This should not do anything, since the files are accessible through a web-browser.
    - This wiki is used in a company. Could it be that java code execution is prohibited due to security reasons?


    In the first line of the scipt I added
    Code:
    "The TSTable script is running.";
    In the following you'll see the central part of html code which is produced:

    Code:
    				</li></ul></form></div>				    													<h1 id="title"><span >Tabletest</span></h1>
    					</div>
    					
    								
    					
    										
    					<div class="pageStatus">
     					     					</div>
     					
     							
    					<div class="PageDW-UserfraheTabletestseite">								
    	 				<div id="page-top"><div id="pageToc"><div class="pageToc"><h5>Inhaltsverzeichnis</h5><em>keine Gliederung</em></div></div><div class="pageText" id="pageText">
    <p>
    The TSTable script is running.<p id="id_HNv8pbQ0" style="display:none;">&nbsp;</p>
    <p><br />
    &nbsp;</p></p>
    <table cellspacing="1" cellpadding="1" border="1" style="table-layout: fixed; width: 100%"> <thead> <tr> <th scope="col">1</th> <th scope="col">2</th> </tr> </thead> <tbody> <tr> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> </tr> </tbody>
    </table>
    <p><br />
    &nbsp;</p></div></div><div class="printfooter" id="printfooter"><hr />
    <p>Geladen von "<a href="http://amazonewiki/User:frahe/Tabletestseite">http://amazonewiki/User:frahe/Tabletestseite</a>"</p>
    </div>
    Last edited by frahe; 02-11-2010 at 02:08 PM. Reason: Added more information.

  2. #52
    Join Date
    Mar 2008
    Posts
    1,630

    Default

    Frahe,
    There are a couple of possibilities:

    1) As you have guessed, you do need UNSAFECONTENT permissions for the JavaScript stuff in the template to work. Check with your admin. This is the most likely problem; I should have thought of it earlier. Once you *do* have unsafecontent permission, edit and re-save the template (I don't know if you actually have to do this, but it can't hurt). Note that you can test out your permissions quickly and easily by putting this on your home page:
    Code:
    {{ wiki.pagepermissions() }}
    If you don't see "unsafecontent:true" in there, then that's your problem. If you're going to be doing anything interesting with templates, you'll need to convince your admin to give you this permission.
    2) If that's not it, then you need to make absolutely sure that your scripts are loading correctly. Can you test the template straight off the app catalog, with no modification to the links? Unless your wiki is cut off from the external world, it should work fine. I'm not discouraging you from hosting the files yourself (far from it), but it's a good way to eliminate one more variable.

  3. #53

    Default

    Hello Neilw,
    perfect you found it! Unsafecontet is not allowed in our wiki. I will check with my administrator if it's possible to change this setting.
    We are a litte bit cautious, since this wiki is used in our company internally and shoud be safe.

    It would be great to put this hint into your documentation to prevent other uses from running into this issue.

    Thanks a lot for your help!
    Florian

  4. #54

    Default Script is working perfectly now

    Due to the good support the script is working properly.
    After having the right for generating unsafe content the script is working. Now I understand what this rights mean... This wiki has a lot of possibilities, great!

  5. #55
    Join Date
    Mar 2008
    Posts
    1,630

    Default

    Glad it's working for you. I've updated the installation instructions to mention the need for unsafecontent permissions; it used to be there but got dropped when I put in the new instructions.

  6. #56

    Default

    Quote Originally Posted by neilw View Post
    what skin are you using?
    We have one that is called beech. It was customized for us by the fine folks at MindTouch.

    On an unrelated matter, is there a way that the table can be sorted and then the new order be printed out? Everytime I print, it goes back to the original order. When you click the Print Page button, the table can still be resorted at that point, but even then, the new order doesn't make it to the hardcopy.

    Thanks again.

  7. #57
    Join Date
    Mar 2008
    Posts
    1,630

    Default

    Quote Originally Posted by bduran View Post
    We have one that is called beech. It was customized for us by the fine folks at MindTouch.
    Ah, well I have no easy way to test Beech right now. Bottom line, I will have to change the way the table headers are styled, and do it in a way that is less prone to this sort of problem. I'll get back to you with this one; changes have to be carefully tested so I don't make things worse on some browsers.

    On an unrelated matter, is there a way that the table can be sorted and then the new order be printed out? Everytime I print, it goes back to the original order. When you click the Print Page button, the table can still be resorted at that point, but even then, the new order doesn't make it to the hardcopy.
    In general, I don't know if there's a solution to this problem. The print function in the wiki uses the html from when the page is first generated; it doesn't know how you might have mangled it since then. So the only thing I can suggest is, if there's one particular sorting that you'll want to print, then make that the default initial sort of the table (if it's not clear how to do this let me know).

    If there are multiple different sorts you might want to print, then, well, you've got a tough challenge on your hands. You'd almost need to build the different sorts into the page DekiScript, which is doable (and not even that hard) but still probably too ugly to be practical.

    Sorry I don't have something better for you. Maybe others (who are probably not reading this thread) have a better idea. Perhaps post a separate thread on how to print pages that have been modified from their original using JavaScript.
    Thanks again.[/QUOTE]

  8. #58
    Join Date
    Nov 2008
    Location
    Ludington, Mi (USA)
    Posts
    751

    Default

    Quote Originally Posted by neilw View Post
    Sorry I don't have something better for you. Maybe others (who are probably not reading this thread) have a better idea. Perhaps post a separate thread on how to print pages that have been modified from their original using JavaScript.
    Thanks again.
    The PrintContainer Template targeting the pageContent Div (If there is one in Beech) will do the trick.

    http://developer.mindtouch.com/index...printcontainer
    We are more ready to try the untried when what we do is inconsequential. Hence the fact that many inventions had their birth as toys. - Eric Hoffer

  9. #59
    Join Date
    Mar 2008
    Posts
    1,630

    Default

    Quote Originally Posted by rberinger View Post
    The PrintContainer Template targeting the pageContent Div (If there is one in Beech) will do the trick.

    http://developer.mindtouch.com/index...printcontainer
    That's cool, though just from a quick skim I'm not sure how it works. If I wanted to print the current page in its current state, how would I use it exactly?

    It is plausible to put hooks into TSTable to make it easier to integrate this, but I need to understand it first.

  10. #60
    Join Date
    Nov 2008
    Location
    Ludington, Mi (USA)
    Posts
    751

    Default

    Quote Originally Posted by neilw View Post
    That's cool, though just from a quick skim I'm not sure how it works. If I wanted to print the current page in its current state, how would I use it exactly?

    It is plausible to put hooks into TSTable to make it easier to integrate this, but I need to understand it first.
    You simply point it at any container (class or id) and it will print the current state of its contents. I use it in all my AJAX created pages.

    It can be configured to print the whole page (div#pageContent for fiesta) or any another specific container, such as a specific table using the TSTable Template (table.tablesorter I think) in its current state.
    We are more ready to try the untried when what we do is inconsequential. Hence the fact that many inventions had their birth as toys. - Eric Hoffer

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts