how to scroll modal window in imacros (slack.com)? - imacros

I have the task: get all names members of (myworkspace).slack.com/messages/****/details/ in #general channel.
On this page I click "Members" -> "See all members".
Modal window appears, and Imacros has to scroll this modal window while all members not visible.
(js) But this code dont work:
var modal = window.content.document.getElementById("generic_dialog"); // Modal window with all members
iimPlayCode("URL GOTO=javascript:modal.scrollBy(0, 1000)"); // Scrolling

In case somebody prefers using a bookmarklet to scroll that list:
javascript:(function() {
var scrInt = setInterval(() => {try {document.querySelector("#channel_membership_dialog_scroller").scrollTop += 5000} catch(e) {clearInterval(scrInt)}}, 1500);
})();

Related

How to avoid modal bootstrap window close?

I have a main window which calls a modal bootstrap window after clicking a edit button.
After working in the modal window, I would like to execute a Oracle procedure, but it is closing my window.
So, I would like to know if there is any option to avoid closing bootstrap modal window after clicking a submit type button?
Thanks in advance.
Kind regards,
Francisco Mtz.
Cerrar
Generar Combinaciones
Actualizar
var partidos = document.getElementById('laluz_32quinielas_1prono_editmodal');
partidos.addEventListener('submit', function(e) {
e.preventDefault();
})
</script>

Oracle APEX hide the x on the modal dialog

I tried to hide the x on the upper right-hand corner of my modal dialog window using both css and JQuery but nothing owrks. I tries using dynamic action on page load:
$("button.ui-button.ui-corner-all.ui-widget.ui-button-icon-only.ui-dialog-titlebar-close").hide();
and to use css:
button.ui-button.ui-widget.ui-state-default.ui-corner-all.ui-button-icon-only.ui-dialog-titlebar-close
{
visibility: hidden !important;
}
for my inline css but neither worked, the x still shows up
The div where this button is showed is rendered in the parent page, so to get it in the modal page, you need to add "parent" in the beginning of your javarscript.
try this:
var button = parent.$('.ui-dialog-titlebar-close'); //get the button
button.hide(); //hide the button

Ionic2 menuToggle is not working after Modal.present

My side menu or menu toggle code is in the app.compnent.ts. This menu toggle is working perfectly in all the pages before I click Modal. MenuToggle is not working after I click the button for Modal. I'm not sure what is the exact issue. Any suggestions please?
Menu:
<ion-icon name="menu" menuToggle float-left margin-right></ion-icon>
PageA:
pageBModal() {
let modal = this.modalCtrl.create(PageB);
modal.present();
}
PageB:
closeModal() {
this.viewCtrl.dismiss();
this.navCtrl.setRoot(DashBoardPage);
}
you can use MenuController
import { MenuController } from 'ionic-angular';
constructor(public menuCtrl: MenuController) {
}
If you want to close menu please use close() event
this.menuCtrl.close()
If you want to open menu please use open() event
this.menuCtrl.open();
Even I have faced the same issue.
I have fixed this by using Events.
If you try to navigate page from modal, You will face with above issue.(Side menu will not work). Instead of navigating from modal ts, Try to navigate from parent ts by using Events.
Eg :
Parent ts :
events.subscribe('modal:finished', (page) => {
if(page == 'yourpage') {
this.navCtrl.push(YourPage);
}
});
Modal ts :
this.events.publish('modal:finished', 'yourpage');
You can send from modal where you need to redirect after modal dismiss. Based on this condition you can redirect wherever you want.
Hope it will help someone.

Return values from ionic2 modal to parent page

I am opening a Modal in ionic2, to search the values from a list. After search, I want to get the selected values back in my parent screen.
searchRooms(){
let modal = this.modalCtrl.create(RoomSearch);
modal.present();
}
This opens my search Modal and there I have list of available rooms. If user click on any room then I want to return back the value to parent page. I am not sure how to do this.
From documentation I feel NavConroller.pop can be used to pass back the values but I don't know how to use that.
Thanks in advance.
You can use onDidDismiss method explained in the Modal Controller.
In the page that opens your modal you can do :
let modal = this.modalCtrl.create(RoomSearch);
modal.onDidDismiss(data => {
// Do things with data coming from modal, for instance :
console.log(data);
});
modal.present();
And this in your modal controller, to close the modal :
this.viewCtrl.dismiss({"foo" : "bar"});

Bootstrap 2: tabs in modal

I have bootstrap tabs in bootstrap modal. When I open modal - it looks like tabs are working, because just the first div tab-content is shown and others are hidden.
But then I have a problem - when I click on tabs it fires shown event at my modal and in this event I'm loading contents of this modal. Because of this tabs are loading again and again and first tab stays always selected.
Modal documentation here: http://getbootstrap.com/2.3.2/javascript.html#modals
Tabs documentation here: http://getbootstrap.com/2.3.2/javascript.html#tabs
I initialize tabs like this:
<script type="text/javascript">
$("#modeTabs a").click(function (e) {
e.preventDefault();
$(this).tab("show");
});
</script>