Search Results

Search found 1481 results on 60 pages for 'highlight'.

Page 16/60 | < Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >

  • rails wiki site - article edit highlighting/strikethrough with htmldiff maxes cpu

    - by mark
    Hi I'm implementing a wiki style site and want to highlight changes made to articles between successive versions. Using htmldiff to highlight changes works great, except it is rather cpu intensive. I'm using the awesome vestal_versions plugin for versioning. So how best to handle this? I considered having an on_create callback on version creation create a delayed job that processes and then stores the htmldiff processed article (in the version table row). If this is a good approach, how can I extend vestal_versions without touching the gem? Or maybe there would be a better approach. Any advice is much appreciated. :)

    Read the article

  • javascript and css working on firefox but not working on IE

    - by Nirbhay saini
    Hi I have this code which working on fitrefox but not working on IE missing last charector on IE <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>wrapped</title> <script type="text/javascript" language="javascript"> function set_padd(){ var tt = document.getElementById("span_padding").innerHTML; var txt = new Array(); txt = tt.split(" "); var atxt = ''; var f_txt = ''; var wrd_pr_linr = 4; var cnt = 1; for(var i = 0; i < txt.length; i++){ if(txt[i].length > 0){ txt[i] = txt[i].replace(' ',''); if(cnt < wrd_pr_linr){ if(txt[i].length > 0){ atxt += ' '+txt[i].replace(' ',''); cnt++; } }else{ f_txt += '<a class="padd_txt" >'+atxt+'</a><br />'; atxt = ''; cnt = 1; } } } document.getElementById("span_padding").innerHTML = f_txt; } </script> <style type="text/css"> .padd_txt{padding:7px;background:#009;color:#FFF;line-height:26px;font-size:14px;} body{font-family:'Trebuchet MS', Arial, Helvetica, sans-serif; font-size:24px; line-height:1.2em;} span{background-color: #009; width:200px; color: #FFF;" class="blocktext;} </style> </head> <body onload="set_padd();"> <div style="width: 350px;"> <p> <span id="span_padding"> This is what I want to happen where one long string is wrapped and the text has this highlight color behind it. </span> </div> </body> </html> out put on firefox is This is I want to happen where one string is wrapped and the text this highlight behind it. and output on IE This is what want to happen one long string wrapped and the has this highlight missing last two word

    Read the article

  • Can Ruby on Rails handle AJAX Response by Static Javascript code? by using RJS?

    - by Jian Lin
    So it looks like on RoR, when Ajax (using form_remote_tag) returns a success code, Javascript is also returned to handle the visual effects. (this is the RJS mechanism) using Fiddler, I do see the following response: try { Element.update("vote_score", "Score 58"); $("vote_score").visualEffect("highlight"); } catch (e) { alert('RJS error:\n\n' + e.toString()); alert('Element.update(\"vote_score\", \"Score 58\");\n$(\"vote_score\").visualEffect(\"highlight\");'); throw e } Will there be situation where the code is quite big (like 1 or 2k) that RJS can use some sort of static Javascript already loaded to handle the effect? Is there any other ways to use static Javascript already loaded with the page? Must it be just raw Javascript and use the Prototype's Ajax success response to call the static Javascript code, or can it be some Rails mechanism related to RJS?

    Read the article

  • XSLT Stylesheet works with a vbs script, but not Perl

    - by user2472274
    I have a program that is essentially a search application, and it exists in both VBScript and Perl form (I'm trying to make an executable with a GUI). Currently the search application outputs an HTML file, and if a section of text in the HTML is longer than twelve lines then it hides anything after that and includes a clickable More... tag. This is done in XSLT and works with VBScript. I literally copied and pasted the stylesheet into the Perl program that I'm using and it does everything right except for the More... tag. Is there any reason why it would be working with the VBScript but not Perl? I'm using XML::LibXSLT in the Perl script, and here is the template that is supposed to be creating the More... tag <xsl:template name="more"> <xsl:param name="text"/> <xsl:param name="row-id"/> <xsl:param name="cycle" select="1"/> <xsl:choose> <xsl:when test="($cycle &gt; 12) and contains($text,'&#13;')"> <span class="show" onclick="showID('SHOW{$row-id}');style.display = 'none';">More...</span> <span class="hidden" id="SHOW{$row-id}"> <xsl:call-template name="highlight"> <xsl:with-param name="text" select="$text"/> </xsl:call-template> </span> </xsl:when> <xsl:when test="contains($text,'&#13;')"> <xsl:call-template name="highlight"> <xsl:with-param name="text" select="substring-before($text,'&#13;')"/> </xsl:call-template> <xsl:text>&#13;</xsl:text> <xsl:call-template name="more"> <xsl:with-param name="text" select="substring-after($text,'&#13;')"/> <xsl:with-param name="row-id" select="$row-id"/> <xsl:with-param name="cycle" select="$cycle + 1"/> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="highlight"> <xsl:with-param name="text" select="$text"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template>

    Read the article

  • Eclipse keyword highlighting in in my own text editor

    - by Torok Balint
    I made a simple text editor in eclipse to which I added some simple WordRule based syntax highlighting to highlight the language keywords. The problem is that when a keyword is part of an identifier (eg. "import" is part of "extra_import"), then "import" is highlighted in "extra_import". How can I stop eclipse to highlight a a keyword if it is only a sub string of another string? Anlther question; is there a regular expression based IRule? What is the purpose of WhitespaceRule? White spaces are usually not highlighted. Thaks

    Read the article

  • JQuery validation - how to set the title attribute to the error message

    - by JK
    In JQuery validation the default behavior on an error is to create a label like so: <label for="FirstName" generated="true" class="error">This field is required.</label> Is it possible to change it so that it will output this instead (with a title attribute set to the error message)? <label for="FirstName" generated="true" class="error" title="This field is required.">This field is required.</label> I've tried the highlight method, but the label has not been created yet: $("#form").validate({ highlight: function (element, errorClass) { var label = $("label[for=" + element.id + "]"); // but label doesn't exist yet so this doesnt work if (label && label.length > 0) { // label.length is always 0 label.attr('title', label.text()); } } });

    Read the article

  • Vimrc: how to reuse code and definitions for differnt file types?

    - by sixtyfootersdude
    I have defined my own file types using vim. For example I have: .classNotes .reportJotNotes .homework These file types are defined in .vim files: ~/.vim/syntax/homework.vim ~/.vim/syntax/reportJotNotes.vim ~/.vim/syntax/homework.vim Many of these things have several of the same code in them. Ie they all have this for titles: syn region JakeTitle start=+=== + end=+===+ oneline highlight JakeTitle ctermbg=black ctermfg=Yellow syn region JakeMasterTitle start=+==== + end=+====+ oneline highlight JakeMasterTitle cterm=bold term=bold ctermbg=black ctermfg=LightBlue Instead of having this in all three .vim files I would rather have it in one file and then in each file could source it. How can I do this?

    Read the article

  • Javascript / jQuery Exec turns up Null

    - by Matrym
    How do I skip over this next line if it turns out to be null? Currently, it (sometimes) "breaks" and prevents the script from continuing. var title = (/(.*?)<\/title/m).exec(response)[1]; $.get(url, function(response){ var title = (/<title>(.*?)<\/title>/m).exec(response)[1]; if (title == null || title == undefined){ return false; } var words = title.split(' '); $.each(words, function(index, value){ $link.highlight(value + " "); $link.highlight(" " + value); }); });

    Read the article

  • jQuery Validation - Highlighting Radio Labels

    - by Michael
    I'm trying to use jQuery validation to highlight the labels for my radio buttons only, and not the labels for my other inputs. I have a label for my radio button set called 'type'. I can't seem to get it to work! $(document).ready(function(){ $("#healthForm").validate({ highlight: function(element, errorClass) { $(element).addClass(errorClass) $(element.form).find("label[for='type']") .addClass("radioerror"); }, unhighlight: function(element, errorClass) { $(element).removeClass(errorClass) $(element.form).find("label[for='type']") .removeClass("radioerror"); }, errorPlacement: function(error, element) { } }); });

    Read the article

  • Dynamically changing background color of specific text without changing other attributes

    - by gsingh2011
    I've written a chrome extension to find text on a page based on a regex query. When text is matched, I wrap the matched text in a <span> tag that has the class highlight where highlight only changes the background color to yellow. The issue is that sometimes there are already styles applied to <span> tags in a webpage. For example, the webpage might have this defined: span { font-size: 200%; } So when I insert my <span> tag in another <span> tag, the font-size is actually 400%. Is there an easy way for my code to just change certain properties of the text, like the background color, without applying the webpage's styles twice?

    Read the article

  • Manage multiple Jlabel's events

    - by IMAnis_tn
    I have a left Panel with multiples Jlabels which i use them as buttons to change a Main Panel's content which is layouted with a CardLayout. I cant work perfectly with these events: mouseEntered : to make highlight effect to the jlabel mouseExited : to take off the highlight effect. mouseClicked : to change the content of the main Panel and start some threads The problem here that can't found an event or a method tell me that another Jlabel has been clicked so i can stop my threads started in the mouseClicked event, OR an event or method tell me that a JPanel in the CardLayout has been displayed or hidden.

    Read the article

  • Match e-mail addresses not contained in HTML tag

    - by SvartalF
    I need to highlight an email addresses in text but not highlight them if contained in HTML tags, content, or attributes. For example, the string [email protected] must be converted to <a href="mailto:[email protected]">[email protected]</a> But email addresses in the string <a href="mailto:[email protected]">[email protected]</a> must not be processed. I've tried something like this regexp: (?<![":])[a-zA-Z0-9._%-+]+@[a-zA-Z0-9._%-]+.[a-zA-Z]{2,6}(?!") but it doesn't work properly.

    Read the article

  • How to access YAML sublevel item in a nested variable?

    - by Kleber S.
    Getting the error: You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occurred while evaluating nil.[] APP_CONFIG are loading fine. account_type = 'sample' allowed = APP_CONFIG['account']["#{account_type}"]['highlight'] Error points to 'allowed' variable line. The method that I currently trying to is: def self.allow_highlight?(account) account_type = Account.find(account).active_pack # returning a string - OK logger.debug account_type.class # checked on console - OK allowed = APP_CONFIG['account']["#{account_type}"]['highlight'] # Error line if total_account_highlight > allowed false else true end end Hope you understand. Any doubts, please ask me. Thanks!

    Read the article

  • Change highlighting of certain subviews in a UITableViewCell

    - by SpacyRicochet
    Is it possible to exclude certain subviews in a UITableViewCell from being highlighted or to change their highlight implementation? I added an orange warning label to the UITableViewCell for certain occassions and it highlights properly with the rest of the cell, which is good. However, when the cells stops being highlighted in an animated way, you first see the background of the warning label become white and then flash to orange. I would either like it to be excluded from being highlighted at all, or to change it's highlight implementation so it animates back to orange properly.

    Read the article

  • Question about software that tracks divs better than notepad++

    - by Jeff
    I recently got hired as a web developer, and the project that I am overseeing has a formatting issue on one of the pages because one of the divs is out of whack. It is a fairly complex page with quite a bit of php, and from what I can gather, I am missing a </div> tag somewhere, and accordingly everything is messed up. I am currently using notepad++, which is decent at lining up divs, meaning that if you click on the opening div tag, it will highlight purple and also highlight the closing one. But it seems as though if you have div tags that span several lines (hundreds) it won't work. Has anyone else run into a similar situation? Is there a better editor I could be using that would do a better job of helping me with my div issue? Or do I have to go through and line up the divs 1 by 1? (there are like over 100). Please let me know!! Thanks

    Read the article

  • Highlighting text in a textbox using Javascript

    - by zohair
    Hi, I have an ASP.NET 2.0 webapp (with C#). I wanted to add a button which, when clicked would highlight selected text. By 'highlight', I mean change the CSS properties of the text so that it can stand out. I think this can be done with some clientside JavaScript. I know that you can assign a Javascript function to the onclick event of an HTML input button, but since I'm not very proficient at JS the function itself I have no idea how to write... Can someone please help? Thanks a bunch!

    Read the article

  • How do I make Dreamweaver to show me closing tags?

    - by KaiserSoze
    Hello, I would like Dreamweaver to show me the opening/closing tag when I select a tag. This functionality is seen in many editors, I know for sure Eclipse has it. To make things clearer: When I select/highlight a opening tag with my mouse I would like Dreamweaver to select/highlight the closing tag. My main questions: Does anybody know what this functionality is called? Does anybody know how to add this functionality to Dreamweaver? I've tried searching the Dreamweaver extensions on the Adobe exchange but couldn't find what i'm looking for. Thanks in advance! Kind regards, KaiserSoze

    Read the article

  • How to validate if all check boxes are ticked in jQuery?

    - by Jude
    I am a beginner in jQuery and I was wondering how to validate the form before submission specifically for check boxes. I am creating a simple check list form where my user would tick a check box if he finished that step. What I am planning to do is that, the script would prevent the form submission if there is an "unticked" checkbox and highlight it with a color. Here's my code : <!doctype html> <html> <head> <meta charset="utf-8"> <title>checkbox</title> <style> .error { background-color:#F00; } .valid { background-color:#0F0; } </style> <script type="application/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"> </script> <script type="application/javascript"> function validateAll() { $(".tick").change(function(){ if ($('.tick:checked').length == $('.tick').length) { $('#container').removeClass(); $('#container').addClass('error'); } else { $('#container').removeClass(); $('#container').addClass('valid'); } }); } </script> </head> <body> <div id="container"><input class="tick" id="option1" type="checkbox"></div> <div id="container"><input class="tick" id="option1" type="checkbox"></div> <input id="button" type="button" onClick="validateAll();" value="check"> </body> </html> So what I am trying to do here is when the user clicks the button, the script will highlight all the unchecked check box with red and highlight all checked with green. However, my script is not functioning. What is wrong with my script? Any suggestions on a more efficient way to do this?

    Read the article

  • How to retrieve CSS style object by CSS class name?

    - by Chir
    Hi, Is it possible to get all properties of a css class associated with an element? e.g. .hightligh { font-weight: bold; border: 1px solid red; padding-top:10px; } Lets say the css class "hightlight" is assigned to div element <div class='highlight'></div> Now using JavaScript, I need to iterate through all style properties of css class "highlight" associated with the div element. Basically, I want to treat it as a JavaScript object whose properties can be accessed using iterator or for loop. Thanks in advance

    Read the article

  • Using a service registry that doesn’t suck Part III: Service testing is part of SOA governance

    - by gsusx
    This is the third post of this series intended to highlight some of the principles of modern SOA governance solution. You can read the first two parts here: Using a service registry that doesn’t suck part I: UDDI is dead Using a service registry that doesn’t suck part II: Dear registry, do you have to be a message broker? This time I’ve decided to focus on what of the aspects that drives me ABSOLUTELY INSANE about traditional SOA Governance solutions: service testing or I should I say the lack of...(read more)

    Read the article

  • [News] S?rie d'articles sur Silverlight 4 et RIA Services de Brad Abrams

    Brad Abrams, un des co-fondateurs de .NET et de la CLR livre ici une s?rie d'articles tr?s int?ressants sur le couple Silverlight 4 et RIA Services : "I thought it would be worthwhile to highlight some of the key features of the platform and tools that make Silverlight a fantastic platform for building business applications. I?ll avoid gratuitous video and dancing hippos and focus on just the bread and butter of business applications (...)"

    Read the article

  • A couple of nice features when using OracleTextSearch

    - by kyle.hatlestad
    If you have your UCM/URM instance configured to use the Oracle 11g database as the search engine, you can be using OracleTextSearch as the search definition. OracleTextSearch uses the advanced features of Oracle Text for indexing and searching. This includes the ability to specify metadata fields to be optimized for the search index, fast rebuilding, and index optimization. If you are on 10g of UCM, then you'll need to load the OracleTextSearch component that is available in the CS10gR35UpdateBundle component on the support site (patch #6907073). If you are on 11g, no component is needed. Then you specify the search indexer name with the configuration flag of SearchIndexerEngineName=OracleTextSearch. Please see the docs for other configuration settings and setup instructions. So I thought I would highlight a couple of other unique features available with OracleTextSearch. The first is the Drill Down feature. This feature allows you to specify specific metadata fields that will break down the results of that field based on the total results. So in the above graphic, you can see how it broke down the extensions and gives a count for each. Then you just need to click on that link to then drill into that result. This setting is perfect for option list fields and ones with a distinct set of values possible. By default, it will use the fields Type, Security Group, and Account (if enabled). But you can also specify your own fields. In 10g, you can use the following configuration entry: DrillDownFields=xWebsiteObjectType,dExtension,dSecurityGroup,dDocType And in 11g, you can specify it through the Configuration Manager applet. Simply click on the Advanced Search Design, highlight the field to filter, click Edit, and check 'Is a filter category'. The other feature you get with OracleTextSearch are search snippets. These snippets show the occurrence of the search term in context of their usage. This is very similar to how Google displays its results. If you are on 10g, this is enabled by default. If you are on 11g, you need to turn on the feature. The following configuration entry will enable it: OracleTextDisableSearchSnippet=false Once enabled, you can add the snippets to your search results. Go to Change View -> Customize and add a new search result view. In the Available Fields in the Special section, select Snippet and move it to the Main or Additional Information. If you want to include the snippets with the Classic results, you can add the idoc variable of <$srfDocSnippet$> to display them. One caveat is that this can effect search performance on large collections. So plan the infrastructure accordingly.

    Read the article

  • Google Chrome Extensions: Launch Event (part 4)

    Google Chrome Extensions: Launch Event (part 4) Video Footage from the Google Chrome Extensions launch event on 12/09/09. Aaron Boodman and Erik Kay, technical leads for the Google Chrome extensions team discuss the UI surfaces of Google Chrome extensions and the team's content not chrome philosophy. They also highlight the smooth, frictionless install and uninstall process for Google Chrome's extensions system and present the team's initiatives in the space of security and performance. From: GoogleDevelopers Views: 2963 12 ratings Time: 15:44 More in Science & Technology

    Read the article

< Previous Page | 12 13 14 15 16 17 18 19 20 21 22 23  | Next Page >