Full screen of div with DOJO - html

I have a div with a DOJO table. I want to display the div in full screen. I have tried using HTML5 API but the height and width are not enlarged in full screen mode. What are the other ways I can achieve a full screen with only the div containing DOJO table with it?? This is the table I have.
dojo.require("dojox.grid.EnhancedGrid");
dojo.require("dojox.grid.enhanced.plugins.Pagination");
dojo.require("dojo.data.ItemFileWriteStore");
dojo.require("dojox.grid.enhanced.plugins.Filter");
dojo.require("dojox.data.QueryReadStore");
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
var gridLayout = [
{
name : "Date & Time",
classes : "title",
field : "date",
width : "140px"
}, {
name : 'Status',
classes : "title",
field : "statusMessage",
fields : [ 'statusMessage', 'statusMessageColor' ],
formatter : formatLink1,
width : "140px"
}];

Related

Is it possible to adjust the pin image size of annotation ti.map

I add the anntation like this
var annot= Map.createAnnotation({
latitude: XXXXXXXXXXX,
longitude: XXXXXXXXXX,
title: 'myPlace',
image: 'myPin.png',
width:'100dp',// doesn't work
height:'100dp'// doesn't work
});
this.mapView.addAnnotation(annot);
}
I would like to change the size of image though,
there seems no way to change.
So I need to edit the file size itself by image editor or something.
Moreover images are show differently in Android or iPhone.
So I need to make two size for each pins.
MapModule.createAnnotation({
latitude : XXXX,
longitude : XXXX,
customView : Ti.UI.createView({
width : widthImg,
height : heightImg * 2,
children : [Ti.UI.createView({
top : 0,
width : width,
height : height,
backgroundImage : "myPin.png"
})]
})
});

How to prevent kendo grid columns from resizing below a specified width?

When I resize the window all the columns become smaller. This is not the behavior I want since some columns are already sized as small as I want them to get from the beginning and I would like them to remain at their starting width while the larger columns shrink.
I tried using the columnResize event to prevent the columns from shrinking below a certain size, however it appears that this event is only for when a user manually resizes a column and it doesn't get fired when the window is resized.
How can I prevent columns from shrinking below a certain size when the window is resized?
(I am using the javascript version of the grid.)
In column definition columns in Grid configuration you can set attribute width. This force size of this column and prevent auto resizing during window resize.
If you don't set this option, column would dynamically fit into space.
{
field: "ColumnName",
title: "Column",
width: 120
}
Please find the solutions below
<script>
$("#grid").kendoGrid({
columns: [
{ field: "name" },
{ field: "age" }
],
dataSource: [
{ name: "Jane Doe", age: 30 },
{ name: "John Doe", age: 33 }
],
resizable: true,
columnResize: function(e) {
$("#grid colgroup col").each(function () {
if ($(this).width() < 50) {
$(this).css("width", "50px");
}
})
}
});
</script>
Please find the Fiddle for a working demo
Another way of it doing it is mentioned here

Kendo ui Grid with large data loads incorrectly with pageable Go to Last Page

I am NOT using serverPaging and Virtual Paging.
Scenario : I have a dropdownlist when get changed it loads the grid.First time I load 100 data items & everything works correctly.
When I change the dropdownlist which will fetch large data like 20,000 total data items it get loaded & works correctly if the navigation is through clicking page number at bottom of grid.
Problem : when I click 'Go to the Last Page' button it shows the Previous POST request's last part of dataItems(90-100 previous date items )showing 100 as total dataitems wrongly.When I click previous page number it loads 80-90 items of correct data updating total size 20,000.
I find if I refresh the grid using pageable refresh button and navigate to the last page it works correctly..After grid's initialisation I tried of calling datasource read() and grid's refresh() but still problem persist.
Kindly help. I am using Kendo UI v2013.1.226.
Thanks in Advance.
FYI: I cant use serverPaging and Virtual Paging due to some restriction .
var myDataSrc = new kendo.data.DataSource({
pageSize : 20,
batch: true,
transport:
{
read: {
url: "../../api/getList",
dataType: 'json',
complete: function(e) {}
},
parameterMap: function(options, operation) {
if (operation == 'read') {
return {
dropdDownId : selectedDD.id
};
}
}
},
schema :
{ model :
{
id : "id",
fields :{
id : {type : "number"},
name:{type:"string"}
}
}
}
});
$("#myGrid").kendoGrid({
dataSource : myDataSrc,
selectable : true,
navigatable : true,
resizable : true,
sortable : true,
pageable:{refresh:true},
scrollable : true,
autoBind : true,
filterable:true,
columns : [ {
field : "name",
title : "name",
width : 150
} ],...
});
};

tinymce text alignment issue

I write text description in tinymce with spaces and html(line break and others etc etc).then i save it to mysql database.when i get it again and alert it,it shows me as same as it was.so till now it is fine.
When again i add it to tinymce to edit it,all html and spaces disappears..what can be the issue?
Here is my code
$('#description').tinymce({
// Location of TinyMCE script
script_url : 'tinymce/jscripts/tiny_mce/tiny_mce.js',
// General options
width : "825",
height: "300",
theme : "advanced",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_toolbar_location : "top",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,bullist,numlist,spellchecker",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
force_br_newlines : true,
force_p_newlines : false,
gecko_spellcheck : true,
forced_root_block : '', // Needed for 3.x
plugins : "paste,spellchecker",
spellchecker_languages : "+English=en,Russian=ru",
// encoding : "xml",
// Example content CSS (should be your site CSS)
content_css : "tinymce/examples/css/content.css",
//
apply_source_formatting : true,
// Replace values for the template plugin
template_replace_values : {
username : "Some User",
staffid : "991234"
}
});
here is how i am getting value
alert(json.description_demo);//this is ok
$("#description").val(json.description_demo);
alert($("#description").val());//now this is not ok..here is issue
tried this also
alert(json.description_demo);//ok
tinyMCE.get('description').setContent(json.description_demo);
alert(tinyMCE.get('description').getContent());//issue not ok
images
You will have to use tinyMce features to get ans set the value.
Try using
tinyMCE.get('description').getContent() to get the value
tinyMCE.get('description').setContent(value from db) to set the value.
Chekout tinymce docs http://www.tinymce.com/wiki.php/API3:method.tinymce.Editor.getContent

Column Freeze or Fixed Column in datatable

Is it possible to freeze first 3 columns of Primefaces' data table?
I'm using Primefaces 3.1
Primefaces does not support fixed columns right now.
Jquery fixed column was used to achieve the same. Reference : http://datatables.net/extras/fixedcolumns/
Example:
var oTable2 = $(primfacesDataTableId).find('table').dataTable({
"sScrollX" : "100%", //Scroll
"sScrollY" : "180",
"bAutoWidth" : false,
"bScrollCollapse" : true,
"bPaginate" : false,
"bSort" : false,
"sInfo" : "",
"sInfoEmpty" : ""
});
var oFC = new FixedColumns(oTable2, {
"iLeftColumns" : 4, //Freezed first for columns
"sHeightMatch" : "auto",
"iLeftWidth" : 405
});
Thanks,
Shikha
For those who are using Primefaces 4.1 or above, this feature is now implemented (it took four years from the first request, by the way):
https://code.google.com/p/primefaces/issues/detail?id=366
You can play with the horizontal scrolling in the showcase.