Use Imacro for write in CKEditor - ckeditor

i'm trying to code a script that auto writes the same thing in a ckeditor and then presses the post button, i've used the event mode, it runs smoothly, but it won't press on the post button.
this is my code:
TAB T=1
TAB CLOSEALLOTHERS
'SET !PLAYBACKDELAY 0.00
URL GOTO=*link*
FRAME F=1
EVENT TYPE=MOUSEDOWN SELECTOR="HTML>BODY" BUTTON=0
FRAME F=0
EVENT TYPE=MOUSEMOVE SELECTOR="HTML>BODY>DIV:nth-of-type(2)>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(7)>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>FORM>SPAN>SPAN:nth-of-type(2)>SPAN>TABLE>TBODY>TR>TD>DIV>SPAN:nth-of-type(2)" POINT="(236,411)"
EVENT TYPE=MOUSEUP SELECTOR="HTML>BODY>DIV:nth-of-type(2)>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(7)>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>FORM>SPAN>SPAN:nth-of-type(2)>SPAN>TABLE>TBODY>TR>TD>DIV>SPAN:nth-of-type(2)" POINT="(236,411)"
FRAME F=1
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY" CHARS="wish me luck"
FRAME F=0
EVENT TYPE=MOUSEDOWN SELECTOR="HTML>BODY>DIV:nth-of-type(2)>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(7)>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>FORM>FIELDSET>INPUT" BUTTON=0
EVENT TYPE=MOUSEUP SELECTOR="HTML>BODY>DIV:nth-of-type(2)>DIV:nth-of-type(4)>DIV>DIV:nth-of-type(3)>DIV:nth-of-type(7)>DIV>DIV>DIV:nth-of-type(2)>DIV>DIV>FORM>FIELDSET>INPUT" POINT="(1464,487)"
the post button code is:
<input type="submit" name="submit" class="input_submit" value="Post" tabindex="50" accesskey="s" id="submit_post" style="">

Related

Call a method when courser is in text-area in vue js

i am new in vue js. i have a text-area for chatting. when courser is in the text area how can i call a method.
here is my code:
<template>
<div class="composer">
<textarea v-model="Keijiban" #keydown.enter="send" #click="selectContact(kokyaku1)" #keydown="selectContact(kokyaku1)" placeholder="ここにメッセージを入力してください。"></textarea>
</div>
</template>
this is my method
selectContact(kokyaku1) {
this.$emit('readkorsi',kokyaku1);
}
how can i call "selectContact(kokyaku1)" method when courser is in text-area
The focus event is triggered when the user selects the textinput and it gains focus.
The blur event is triggered when the user selects anywhere outside of the textarea and it loses focus (blurs).
Use the focus and blur blur events as needed. You may want to remove your keydown listener if you are already listening for the focus event.
<textarea #focus="selectContact(kokyaku1)" #blur="hideContact"></textarea>

How to find selected tab on KendoTabStrip on page load?

I am using Kendo UI MVC and i have a kendoTabStrip on acshtml page. By default I am selecting the first tab on page load. All other tabs are loaded dynamically using AJAX.
Issue: I am trying to find the selected tab so i can find its children?
one way to find active tab is by calling select() method without parameter, or anotherway is by checking classname 'k-state-active' however both methods doesnt work
<section class="tpt-tabstrip">
#(Html.Kendo().TabStrip()
.Name("MyTabStrip")
.Animation(false)
.Items(items =>
{
foreach (var revision in Model.MyCollection)
{
items.Add()
.Text(revision.Name)
.LoadContentFrom("MyActionMethod", "MyController", Model.ID);
}
})
)
</section>
<script src="~/Scripts/MyScript.js"></script>
Note that above in cshtml that the script tag is at the end of the page.
Below is the script code
$(function(){
var tabStrip = $("#MyTabStrip").getKendoTabStrip();
if (tabStrip != null && tabStrip.tabGroup.length > 0) {
tabStrip.select(0); // this line is getting executed for sure
}
// the line below returns -1 here why?????
var index = tabStrip.select().index();
// another way to find active tab is by checkikng class name 'k-state-active' however it didnt work either.
// jQuery couldnt find any element with class 'k-state-active'
$('.k-state-active')
})
UPDATE1
The activate event of tabstrip would not work for me because it get fired each time i select tab. I need an event which gets fired only once. Ultimately i want to find NumericTextBox controls on selected tab and attach 'change' event handlers to those controls. like below
$(function(){
var tabStrip = $('#MyTabStrip').data("kendoTabStrip");
tabStrip.bind('activate', function (e) {
$('[data-role="numerictextbox"]').each(function(){
$(this).getKendoNumericTextBox().bind("change",function(e){
alert('changed');
})
})
});
})
here the change event handler will get attach to NumericTextBox everytime i select the tab
$('.k-state-active') works fine it will return the two elements from DOM. You are trying to select element in $(document).ready that's the reason you are not getting element as tab control is not rendered yet.
Try to write your code onActivate event of kendo tab strip control.
OnActivate event is triggered after a tab is being made visible and its animation complete. Before Q2 2014 this event was invoked after tab show, but before the end of the animation. This event is triggered only for tabs with associated content.
See more at http://docs.telerik.com/kendo-ui/api/javascript/ui/tabstrip#events-activate
1st Tab name
<li class="k-item k-state-default k-first k-tab-on-top k-state-active" role="tab" aria-controls="RoleTabs-1" style="" aria-selected="true">
<span class="k-loading k-complete k-progress"></span>
<a class="k-link">Tab Name</a>
2nd Tab Content
<div class="k-content k-state-active" id="RoleTabs-1" style="display: block; height: auto; overflow: auto; opacity: 1;" role="tabpanel" aria-expanded="true">

2 buttons, same action, how do I tell which button triggered the action in Ember

I have a simple button that has an action.
<button {{action "slide" target="view"}} class="slide up">Slide up</button>
Make that two,
<button {{action "slide" target="view"}} class="slide left">Slide down</button>
Both of these have the same action that is handled by the containing view, something like this:
App.ViewName = Ember.View.extend({
actions:{
slide: function(){
console.log("which button triggered the slide action?");
}
}
});
In the above piece of code, my console log states my quandary. I am not sure how I can identify which button {the Slide Up OR the Slide Down} triggered the slide action.
I mean, this is basic straightforward stuff in jQuery where you can simply use the 'event' to determine the calling button. But in Ember, all these concepts seem to desert me.
honestly I'd make it two different actions, but you can send a value to the action
{{action slide "up"}}
slide: function(type){
console.log(type);
}

How to render/not render Close link of Jquery dialog box?

I have/can have only one Jquery dialog box. This dialog box has some advertisement content to the User.
On reading it, a User can avail the offer or ignore it for the time being.
User can avail the offer by clicking on Submit button inside the dialog box.
Or he can ignore it by clicking on "Remind me later" link which will close the dialog box.
Contents inside dialog box are updated through Ajax. So when Submit button is clicked,
a thank you message is shown inside the same dialog box.
When User avails the offer, "Remind me later" link would still be there. If User clicks on that, logically, dialog
box should be shown again. But, User has already availed the offer!
How can I render or not render Close link of Jquery dialog box programatically?
Code for dialog box is below,
$h(document).ready(function() {
$h("#showForm").dialog({
open: function(event, ui) {
jQuery('.ui-dialog-titlebar-close').html('<span>Remind me later</span>');
jQuery('.ui-dialog-content').removeClass("ui-dialog-content").addClass("advertise-upgrade-content");
},
duration: 800,
height: 727,
minWidth: 811,
width: 811,
position: ['middle', 154],
zIndex: 99999999,
modal: true,
show: {
effect: 'puff',
duration: 400
},
hide: {
effect: 'puff',
duration: 400
}
});
});
<div id="showForm" height: 670px;">
<div class="submitClass">
<a4j:commandLink immediate="true" action="#{myBean.clickToAvail}" reRender="renderSuccess" value="Submit">
</a4j:commandLink>
</div>
<h:panelGroup id="renderSuccess">
<h:outputText value="Thank you for availing this offer">
</h:panelGroup>
</div>
Am using jquery.min.js, jquery-1.6.2.js , jquery-ui.min.js.
In the open function, make a logical check whether Thank you message container is visible (assuming that it's visible only if the user has availed the offer) and if it's visible, hide close ('Remind me later' in your case) or else, show it.
Also, you're using a very generic code to manipulate the attributes of dialogue in open. You should make use of the ui variableto make your code specific to only the current dialog
Refer to this thread for both close manipulation and example usage of ui variable
EDIT: making four changes
1) Give an id to the span
NB: This still needs to be specific to this dialog. Please refer to the thread mentioned above.
jQuery('.ui-dialog-titlebar-close').html('<span id=\'reminder\'>Remind me later');
2) Define a boolean variable say availed in your bean and set it in your clickToAvail method
public void clickToAvail(){
// business logic here
this.availed = true;
}
3) Use data and oncomplete
<a4j:commandLink immediate="true" action="#{myBean.clickToAvail}" data="#{myBean.availed}" reRender="renderSuccess" value="Submit" oncomplete="removeReminder(event.data);">
</a4j:commandLink>
4) Define a removeReminder javascript function in the <head> of your page
function removeReminder(availed){
if(availed == 'true' || availed == true)
$('#reminder').hide(); // or remove() decide as per your requirement
}

Problem with animation extender and IE9

I am using ajax animation extender in my application. It is working perfectly in almost all browsersexcept IE9. I am using the code as:
<cc1:AnimationExtender ID="OpenAnimation" runat="server" TargetControlID="btnAddNewComment"
BehaviorID="OpenAnimationBehavior">
<Animations>
<OnClick>
<Sequence>
<%-- Disable the button so it can't be clicked again --%>
<EnableAction Enabled="false" />
<%-- Position the wire frame and show it --%>
<StyleAction AnimationTarget="flyout" Attribute="display" Value="block"/>
<%-- Move the wire frame from the button's bounds to the info panel's bounds --%>
<Parallel AnimationTarget="flyout" Duration=".3" Fps="25">
<Resize Width="850" Height="420" />
<Color PropertyKey="backgroundColor" StartValue="#AAAAAA" EndValue="#FFFFFF" />
</Parallel>
<%-- Move the panel on top of the wire frame, fade it in, and hide the frame --%>
<StyleAction AnimationTarget="info" Attribute="display" Value="block"/>
<FadeIn AnimationTarget="info" Duration=".2" />
<StyleAction AnimationTarget="flyout" Attribute="display" Value="none"/>
</Sequence>
</OnClick>
</Animations>
</cc1:AnimationExtender>
Corresponding JS function to play the animation is:
// function to open the animation popup
function OpenExtender(tempCommentID)
{
var behaveYourself = $find("OpenAnimationBehavior");
var onClickAnimation = behaveYourself.get_OnClickBehavior();
onClickAnimation.play();
return false;
}
While clicking on button 'btnAddNewComment' a pop up is coming, but the problem is on mouse over the popup div. When i do mouse over over the popup, the popup get disappeared.
Could anybody say what will be the problem?
it seem to me, that IE9 doesn't remember the changes made via Animation Extender. Even the official sample doesn't work. If (for example) the Display: none, and you animated it to Dislay: block, when the animation stops it will revert do Display: none on the next redraw (you need to move mouse over the element, or otherwise invoke refresh). I hope it will be fixed really soon.
I realize the next step:
Remove the following code in the control called from the AnimationExtender:
"opacity: 0; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);"
After that, the problem was fixed.

Resources