Expanding Rally Custom grid rows to show task automatically - rally

I am using custom grid to show my stories on dashboard widgets. I want to see my task under story too. This cannot be done unless, I manually click on small triangular image and the expand row to show tasks under story. Is there a way to do this automatically through setting or script like tampermonkey?

I was able to achieve this using tampermonkey!
// ==UserScript==
// #name Expand Rally Tasks
// #namespace http://tampermonkey.net/
// #version 0.1
// #description try to take over the world!
// #author Main Shayar Badnam
// #match https://rally1.rallydev.com/
// #grant none
// ==/UserScript==
(function() {
'use strict';
setTimeout(
function () {
$('.x4-tree-elbow-img.x4-tree-elbow-plus.x4-tree-expander').click();$('.x4-tree-elbow-img.x4-tree-elbow-end-plus.x4-tree-expander').click();
}
,2000
);
$().ready();
})();

Related

How to hide swagger models at bottom with gin-swagger?

I am using gin-swagger for generating API document.
It shows Models at the bottom of the page list by default.
How to hide it?
I met the same issue before, I removed one annotation in comment and Models gone. But I could not remember the name of annotation, however, you can compare your annotaions with below and remove the additional one.
// #Summary Get all users
// #Description Get all users
// #Tags UserMgt
// #Accept json
// #Produce json
// #Param filter body object{UserFilter} true "filter"
// #Success 200 {array} object{models.User} "users"
// #Failure 400 {object} object{models.User} "users not found"
// #Router /user/all [post]
// #Security ApiKeyAuth
func GetAllUsers(ctx *gin.Context) {
....omitted....
}
You juste have to add this line
ginSwagger.DefaultModelsExpandDepth(-1))
like that
ginSwagger.WrapHandler(swaggerFiles.Handler,
ginSwagger.DefaultModelsExpandDepth(-1))

IBM MobileFirst Detect Application Version Update

During version update, user will receive an update notification once he active the app, an update alert box will pop up, and he/she is able to choose "Update" or "Cancel" the update request.
How do I detect the action(Update/Cancel) user choose ?
If using the feature as provided by default in the product, you cannot.
In order to do such "detection", you will need to implement Custom Direct Update, but it doesn't sound like a full customization is needed in your case, so you can take a look at the following example under "customizing the UI": https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/advanced-client-side-development/using-direct-update-to-quickly-update-your-application/#userExprience
In the example code, there is additional code that either starts or cancels the update process, so it is this spot that you could add additional code to "know" that it was either started or canceled.
wl_directUpdateChallengeHandler.handleDirectUpdate = function(directUpdateData,
directUpdateContext) {
// custom WL.SimpleDialog for Direct Update
var customDialogTitle = 'Custom Title Text';
var customDialogMessage = 'Custom Message Text';
var customButtonText1 = 'Update Application';
var customButtonText2 = 'Not Now';
WL.SimpleDialog.show(customDialogTitle, customDialogMessage,
[{
text : customButtonText1,
handler : function() {
directUpdateContext.start();
// Additional code here.
}
},
{
text : customButtonText2,
handler : function() {
wl_directUpdateChallengeHandler.submitFailure();
// Additional code here.
}
}]
);
};

Bootstrap 3 collapse with javascript not working

When I'm using Javascript options for collapse, the toggle doesn't work. It only opens first time the panel.
This one works well - $('#login').collapse('toggle')
But I want to add more options like parent.
http://www.bootply.com/DFfPmKnDTd#
this code can be help...
$('#login').collapse({
toggle : true,
parent : '#accordion'
});
$('#c1').on('click', function(){
$('#login').collapse('toggle');
}
);
First you need to initiate collapse function and then make call to toggle it.
Then you need to initialize each collapse link.
Try using by using this code may be it can work for target link.
$.each($('#accordion .accordion-toggle'), function(index, collapse_link)
{
var $collapse = $('#collapse_element_id'+element_no); // you need to right here '#c'+element_id ( it will take #c1, #c2 , #c3 )
$collapse.collapse({
toggle : true,
parent : '#accordion'
});
$(collapse_link).on('click', function(){
$collapse.collapse('toggle');
});
});

OpenTok - How to publish/unpublish manually?

I looked at these links
http://www.tokbox.com/opentok/api/tools/js/documentation/overview/publish.html
http://www.tokbox.com/opentok/api/tools/js/tutorials/overview
but their are no examples for publishingunpublishing manually, that is, publishing/unpublishing without using 'streamCreated'/'streamDestroyed' event handler respectively.
The reason I want to do this is that I have a button to publish/unpublish so that the user can do it at will.
Is there a way to do this?
Yes and it is very simple. Check out the prepublish source code to see how. There are 2 functions, startPublishing() and stopPublishing() which achieve this.
Primarily they use session.publish(publisher);to publish and session.unpublish(publisher); to unpublish.
Here is code I have used to work off:
// Called by a button to start publishing to the session
function startPublishing() {
if (!publisher) {
var parentDiv = document.getElementById("myCamera");
var publisherDiv = document.createElement('div'); // Create a div for the publisher to replace
publisherDiv.setAttribute('id', 'opentok_publisher');
parentDiv.appendChild(publisherDiv);
var publisherProps = {
width : VIDEO_WIDTH,
height : VIDEO_HEIGHT
};
publisher = TB.initPublisher(apiKey, publisherDiv.id, publisherProps); // Pass the replacement div id and properties
session.publish(publisher);
show('unpublishLink');
hide('publishLink');
}
}
//Called by a button to stop publishing to the session
function stopPublishing() {
if (publisher) {
session.unpublish(publisher);
}
publisher = null;
show('publishLink');
hide('unpublishLink');
}

Using Global Function in Titanium

I am making Titanium mobile project where I want to make one global function which I can use throughout the application. For that I have created other .JS file where I have defined the function and I am including that .JS file where I need to use this function and I am successfully able to call the function.
But My question is :
Can I create new Window in that function? As I have added one Label and one MapView in that window but it is not showing, while at the start of function I have added alert('FunctionCalled'), it is showing me alert but not showing me the label I have added in the window.
So anybody can help me to find out whether we can open window through function. If yes then any sample example, so that I can find out what mistake I am making.
Thanks,
Rakesh Gondaliya
you approach CAN work but is not a best practice, you should create a global namespace, add the function to that namespace and then only include the file with the function once in app.js
// apps.js
var myApp = {};
Ti.include('global.js','ui.js');
myApp.ui.openMainWindow();
then we create a seperate file for our ui functions
//ui.js
(function(){
var ui = {};
ui.openMainWindow = function() {
// do open window stuff
// call global function
myApp.global.globalFunction1();
}
myApp.ui = ui;
})();
here is where we create our global functions, we will not have to include the file everywhere since we are adding it to our global namespace
//global.js
(function(){
var global = {};
global.globalFunction1 = function() {
// do super global stuff
}
myApp.global = global;
})();
this is a simple outline of how it can be implemented, I have a complete code listing on my blog
Yes you can create a new window or add a label or anything else. If you wanted to add a label to the current window then you would do:
var helloWorld = Ti.UI.createLabel({ text: "Hello World", height: "auto", width: 200 });
Ti.UI.currentWindow.add(helloWorld);
It won't matter where the code is executing because Ti.UI.currentWindow will be the active window regardless.