AngularJS ui-grid hide all the rows - angularjs

I am using ui-grid i just want header to be visible and all the rows will be hidden. Can someone guide how to make this change ?
For the same i have created jsfiddle
currently the css is below, i dont know how to change css for this problem :-
.grid {
width: 500px;
height: 250px;
}

If you wanna hide all rows (ONLY USING CSS) just do the following
.ui-grid-viewport{
display:none;
}
.ui-grid{
height:100% !important;
}
jsfiddle: http://jsfiddle.net/nujpd76y/5/
Well, this will permanently hide your rows, if that is what you want. Otherwise if you could just explain your use-case / requirement ... as in what you are trying to do so as we can suggest a more "angular way" to do this. :)
UPDATE:
If you want to hide header text then add following
.ui-grid-header-cell-label{
display: none;
}
jsfiddle: http://jsfiddle.net/nujpd76y/7/
Hope this helps!

Related

Angular Bootstrap - Tooltip not showing

I have a simple form that is inside Angular UI Bootstrap's tabs. Form controls have tooltips associated with them to show errors. I'm using custom event that will toggle tooltip visibility.
The idea is to have tooltip visible on required fields.
With UI-Bootstrap version 1.3.2 and Angular 1.4.8 everything is working fine but since I upgraded to Angular 1.5.3 tooltip is not showing anymore. It will show once I actually type something in the text field and delete it which makes me believe that now requires the model to be initialized.
I have here two plunks that will show exactly what is going on:
Working plunk (with angular 1.4.8) - https://plnkr.co/edit/IkuOdCrcFJ8lBeNA5sSh
<data-uib-tabset>
<data-uib-tab>
<data-uib-tab-heading>Tab 1</data-uib-tab-heading>
<form name="testform">
<input type="text" name="test" id="test"
data-ng-model="test"
data-ng-required="1"
data-tooltip-append-to-body="true"
data-tooltip-placement="right"
data-uib-tooltip="Required!"
data-tooltip-trigger="none"
data-tooltip-is-open="testform.test.$error.required" />
</form>
</data-uib-tab>
<data-uib-tab>
<data-uib-tab-heading>Tab 2</data-uib-tab-heading>
Content 2
</data-uib-tab>
</data-uib-tabset>
Not so working plunk (with angular 1.5.3) - https://plnkr.co/edit/Wl3Bq13FKPnqW7RqwfiJ
I noticed as mentioned in the comments that there is a class being attached - uib-position-measure. It has 3 styles that are causing the issue:
top: -9999px !important
left: -9999px !important
visibility: hidden !important
EDIT - I'm reorganizing my post now that I've dug pretty deep into this. Still don't think I have a great solution, but at least have some info and options.
Solution 1
Simply remove the culprit class uib-position-measure with javascript and then adjust the top and left styles on .tooltip.
Plunker
window.onload = function() {
var tooltip = document.getElementsByClassName('tooltip')[0];
tooltip.className = tooltip.className.replace(/\buib-position-measure\b/,'');
}
.tooltip {
top: 42px;
left: 150px;
}
Solution 2
Overwrite the styling that is causing the issue with javascript.
Plunker
<script type="text/javascript">
window.onload = function() {
var tooltip = document.getElementsByClassName('tooltip')[0];
tooltip.setAttribute("style", "visibility: visible !important; top: 42px !important; left: 150px !important;");
}
</script>
Solution 3
I was able to find where the .uib-position-measure class is created in the ui-bootstrap.js file. I removed !important from the visibility, top and left. After that I was able to fix the issue using css on the .tooltip class.
Plunker
ui-bootstrap.js is the file I created, copied the original over, and modified the uib-position-measure class - it is at the bottom on line 7327.
In style.css I simply added the below:
.tooltip {
visibility: visible;
top: 42px;
left: 150px;
}
Related Issue
I was also able to find an issue on GitHub related to this - https://github.com/angular-ui/bootstrap/pull/5530
Someone removed some inline styles and added them as a class, so that they could be overwritten by CSS instead of using javascript. This may be the best way to handle it - https://github.com/angular-ui/bootstrap/pull/5530/commits/44643775dece535b3ffa62d7edae86eaa12ac154. The problem is finding the location of the uib-position-measure inline styling and handling it the same way.
Using popover-popup-delay repositions the element and the class uib-position-measure is no longer active on it.

How to change the font size of a grid title - ExtJS?

I'm new to Ext but after several researches and questions on Stack Overflow, I succeeded to add pictures in grid rows, headers rows, to change font-size, font-color of header titles, etc. But I still don't know how to change the font-size and so of the main title of the panel.
I succeeded to put a picture into the title panel by adding direct CSS, but not much.
Ext.define('AM.view.user.List' ,{
extend: 'Ext.grid.GridPanel',
alias: 'widget.userlist',
cls: 'overall',
title: 'XXX // DEMO <img class="title-icon" style="vertical-align:middle; margin-bottom:10px; " src="xxx/xxx/xxx.png"/> '
It might be a simple question to answer ! Thanks a lot :-)
Best Regards.
It's normally .x-panel-header-text-default CSS class that controls panel header font styles.
If you navigate to a panel header in Firebug inspector you may see:
.x-panel-header-text-default {
color: #333333;
font-family: tahoma,arial,verdana,sans-serif;
font-size: 11px;
font-weight: bold;
line-height: 17px;
}
So you can override that rule in your CSS, or you can say take advantage of headerCls config option to specify your CSS class.

Lightbox Working Fine but Not Showing Scrollbar

I am using lightbox2 but it hides my page scrollbar while opening, after closing scrollbar it stays hide.
I have checked css, if there is some issue with my blog, please let me know.
I have tried all browsers but same is happening on all browsers.
Link to my page which have problem , you may check this...2
Please help me out..
change your css..
whenever you are clicking on the image class named CSS_LIGHTBOX_FIXED_FRAME has been added to html tag and that class has the following css
html.CSS_LIGHTBOX_FIXED_FRAME {
height: 100%;
margin: 0;
overflow: hidden !important;
width: 100%;
}
remove the overflow:hidden part from above and you will have your scrollbar back

Puzzled: Responsive header with special resizing through pure HTML/CSS?

We have a solution utilizing JavaScript, but I'm also curious if there is a way to do this with pure CSS?
The Situation
I'm relatively new to responsive design, and in the past have stuck with positioning, etc to achieve my layouts. I'm attempting to create a simple responsive header that resizes in a specific way.
My Dilemma
The header is a 29px high bar at the top of the page, with 29x29 buttons at either end. In the middle, bordering the button on the right, is a div (for page titles) that I want to have a min width of 300, but I also want it to expand with the browser width.
Here is the catch: I want this title div to pull away from the left button, leaving a gap of a max-width of 200px. Once the max-width of the gap is reached, I would like the title div to start expanding, staying pressed up against the right button. See as follows.
note: I've created a jsfiddle here for experimenting
I've modified your JSFiddle and added a bit of JavaScript to get the effect I think you're looking for. There are also comments to walk you through exactly what the JS code is trying to accomplish.
Essentially, I'm binding a handler to the window.resize event, calculating the available space in the header, and adding or subtracting from the title container to maintain its width.
Okay well here is what I have so far. WILL EDIT in the morning (kind of tired)
I feel this is definitely possible but it does require javascript. The fact that you want there to be a 200px space available requires javascript or some sort of programming to tell the styling to do that.
<!DOCTYPE html>
<html>
<style>
html, body { height: 100%; }
#container { margin-top: 29px; }
header { height:29px; margin: 0 49px; background-color:#999999; }
#div1 { width: 29px; height: 100%; background-color: yellow; display: inline-block; }
#div2 { width: 100%; height: 100%; background-color: blue; display: inline-block; }
#div3 { width: 29px; height: 100%; background-color: red; display: inline-block; float: right;}
#div4 { height: 100%; background-color: yellow; display: inline-block; float: right; }
</style>
<body>
<div id="container">
<header>
<div id="div1">div1</div><div id="div2">div2</div><div id="div3">div3</div><div id="div4">div4</div>
</header>
</div>
</body>
<script>
if (parseInt(document.getElementById("div2").clientWidth) >= 200) {
document.getElementById("div2").style.width = "200px";
}
</script>
</html>
So the way I went about it is rather than having 3 divs, I made 4 -- the original 3 you had, but then the white space you want to consider as, well open space, I made a div for that as well. I also have javascript so that when the window scales past a width of 200px, it will lock it at that width. Unfortunately, I'm not super polished with my CSS yet so I'm still trying to figure a way to get that working. If anyone wants to edit my answer, please feel free.
Another thing to point out is that while the javascript does working for if the nav is growing, it doesn't for shrinking. I didn't implement a way for it to be able to shrink if say the user decided to shrink his window size because I have it set to lock the width at 200px (I guess a way to work around that would be with an } else { clientWidth = "100%"? Not sure. Hope this gets you on the right track though.

How to implement the multiselect combo box in EXT JS

I want to implement the multiselect combo box in my program. Means If I will select multiple names through check box then all selected names will be fall in that combo with comma separated... I want a sample example... Could you please help me..
Use this user extension. Examples page.
you can use combobox plugin Ext.ux.Andrie.Select. For demo :
http://www.andrei.neculau.home.ro/extjs2/ux.Andrie.Select/Select_test.htm
I have Implemented Checkcombo without using any extra plugin or file.
You just need to add image checkbox image in css
And CSS Reference
.chkbox {
height: 13px;
width: 13px;
background: transparent url(please see checkbox image) no-repeat 0px 0px;
float: left;
margin: 4px 5px 0 0;
}
.x-boundlist-selected .chkbox {
background-position: 0 -13px;
}
See the demo in JSFiddle

Resources