Bottom of page imperiyanews
Where is div and table with dinamical id
Them look like <div id="ZzRwXzE3NzMwXzE1MzY5NDQ0MDA" data-ids="1587700,1586609,1586068,1587550,1587700,1586609,1587550,1586068,1586068,1588089,1588041,1587131"><table id="ZzRwXzE3NzMwXzE1MzY5NDQ0MDA_table_17730"
I tried to filter them out by rules like
www.imperiyanews.ru##table[id$="A_table_17730"]
www.imperiyanews.ru##[class^="Z"]
www.imperiyanews.ru##[id^="Z"]
www.imperiyanews.ru##.b-block.block > div > div:nth-of-type(3)
But rules didnt work for me.
In element picker mode - these rules hilighted right element, but after reload page - element not filtered
Related
If there are no Class or DIV designations for the items within this unordered list, how would you go about using the %this.innerHTML% notation to pull which link was clicked in an Event-Based rule?
< div class="relatedCategories rowBottomSpace" >
< strong class="header black short">Related Categories</strong>
<ul>
<li>
LINK 1
<span>|</span>
</li>
<li>
LINK 2
<span>|</span>
</li>
<li>LINK 3
</li>
</div>
Solution #1: Update your selector to be more specific
This is the solution I mentioned in my comment above. Assumption is that your Condition's Element Tag or Selector is something like div.relatedCategories. If you change it to specifically target links within it: div.relatedCategories a then this will reference the link that was clicked.
Solution #2: Use a custom condition and data element
Let's say for whatever reason(s) you want to keep the original higher level selector:
div.relatedCategories.
Leave it as such, and then under
Rule Conditions > Criteria
choose Data > Custom and then click "Add Criteria".
In the Custom code box, add the following:
var target = (event.target) ? event.target : event.srcElement;
_satellite.setVar('linkTarget',target);
return true;
This will create a data element called linkTarget which will hold an html element object reference to the clicked link. So then you can use %linkTarget.innerHTML% or alternatively, back up in the Custom code box you can set linkTarget to be target.innerHTML and then reference with %linkTarget%.
I used Client side Pagination. In 1st page i have 5 rows.
var grid = jQuery("#mygrid").jqGrid('getGridParam', 'data');
$('#mygrid').jqGrid('getCell',grid[0].Id, 'Color');
Here grid[0].Id is unique key value of our grid.
The above line returns whole html tag with below options:
"<select class="editable" size="1" name="Color" id="xxxxxxxxx_Color" role="select"><option selected="selected" value="Pink">Pink</option><option value="Blue"> Blue</option><option value="Black"> Black</option><option value="Red"> Red</option></select>"
when i tried to access 6th record which is in another page:
var grid = jQuery("#mygrid").jqGrid('getGridParam', 'data');
$('#mygrid').jqGrid('getCell',grid[5].Id, 'Color');
Its returning false.
I tried grid[5].Color which only gets selected value option of dropdown. But i want all options of dropdown, just as i got for the 1st record. getCell only works for current page's rows its not working properly for other pages during pagination. Is there any way that i can access all options of dropdown cell of every row in grid.
When I use an empty span, let's say
<span class="anchor" id="jumptome"></span>
ckeditor removes it.
To the config.js of ckeditor I added
CKEDITOR.editorConfig = function( config ) {
config.IgnoreEmptyParagraphValue = true;
};
CKEDITOR.dtd.$removeEmpty.span = 0;
Now ckeditor does not remove the spans, but they are wrapped in p's like
<p><span class="anchor" id="jumptome"></span></p>
Is there any configuration to remove the p's (I need the paragraphs for other elements, just want to avoid them for the spans).
Thanks in advance!
Why would you need the spans? If you need an anchor, why not use for example a DIV which can be styled to be a visible block in the Editor but an invisible ... anchor in the output content? I do this in my CKE app. Although I use widgets for anchors but same princible anyway.
I'm guessing the reason is because of caret positioning and user targeting - how would the user target that anchor? If it can't be targeted - why do you need it in the contents? Why not something targetable?
In CKEDITOR 4 I'm using the inline mode
I have a BulletedList with <ul contenteditable="true">
and when I press ENTER I can't not create a new LI with a <P contentenditable="true"> children to have the toolbar for format text options.
Here the JSFIDDLE
And here the list plugin source
You cannot build your editor on <ul> element because CKEditor wasn't designed to work like that. You can find the list of editable elements by calling CKEDITOR.dtd.$editable in your console:
CKEDITOR.dtd.$editable
>>> Object {address: 1, article: 1, aside: 1, blockquote: 1, body: 1…}
You can wrap your list in div element, make it editable and strip out when retrieving data. There's a simple example of how to modify elements on editor output. You'll need to return false when your div is processed. This is it.
You can also do this with RegExp but I don't find it gentle ;)
I'm trying to find the best way to render a li-element :
I've read that i should never replace this.el
So it seems that i have to unwrap my template in my LiView render() function :
// replace element content with html generated from template
var $rendered = $.tmpl(this.template, this.model.toJSON());
this.el.html($rendered.unwrap().html());
I just get the contents inside the $rendered li, since i should not replace it.
But how should i transfer attributes ?
I tried :
this.el.attr('class', $rendered.attr('class'));
this.el.attr('title', $rendered.attr('title'));
But it replaces attributes... And some (like jQuery ui ui-draggable) could be lost.
All this seems a bit clunky...
Thanks !
I'm not sure I fully grasp what you're trying to do Olouv, but I'll have a stab at answering your question regardless :)
You have an liView that corresponds to an li dom element
So you need to specify
el: "li"
Do not have an li in your template. Then the result of your render will be
<li>
contents of template
</li>
Now you want to add attributes to this li element?
Class names are pretty simple, just add the className attribute to your view
className: "ui-draggable myGreatClass ui-corner-all"
If you need to add additional attributes to your root (li) element
$(el).attr("title","your title")
If that doesn't work for you, and you want to put the li attributes in your template perhaps consider some form of the following:
Tolerating HTML of the form:
Instead of an liView (list item view), just have a ulView (List view), and put a loop construct in your template