Add this to wp-admin/nav-menus.php :
<style type="text/css">
.munevera {
display:block;
}
.categorydiv div.tabs-panel, .customlinkdiv div.tabs-panel, .posttypediv div.tabs-panel, .taxonomydiv div.tabs-panel, .wp-tab-panel {
max-height: 400px;
}
.menu-item-bar .menu-item-handle {
padding: 5px 15px;
}
.menu-item-bar {
margin: 3px 0 0;
}
div#side-sortables {
position: fixed;
top: 250px;
left: 180px;
width: 300px;
}
</style>
My road to build usable AngularJS app with WebAPI. Here are some tips and tutorials which I used to solve my problems and to keep solutions on one place so I can easily find it when needed.
Popularni postovi
-
These days I tried a lot of select/Dropdown/Combobox controls in angular but on the end I realized that classic select2 (angular version) wo...
-
In Web API insert this: public IHttpActionResult GetKontakti(int page = 1,int itemsPerPage = 30, string sortBy = "Nazi...
-
Source: http://stackoverflow.com/questions/21255203/angularjs-clientside-routing-and-token-authentication-with-webapi Interceptors: http...
-
In order to show ng-grid you must do this: add 'ngGrid' to app definition like this: var app = angular.module('AngularAuthApp...
-
'use strict'; app.controller('ordersController', ['$http','$scope', 'ordersService', function ($htt...
-
After reading this answers article and this blog I changed: entity . Metadata = @"res://*/Data.System.csdl|res://*/Data.Syst...
-
I found that jQuery UI datepicker when putted in directive is better than Angular UI date picker because it requires less JavaScript code be...
-
Visit: http://ngmodules.org/ There are modules for everything...
-
Here is tutorial: http://pointblankdevelopment.com.au/blog/angularjs-aspnet-web-api-2-server-side-sorting-searching-and-paging Suppose we...
-
The || operator can be used to fill in default values: var middle = stooge["middle-name"] || "(none)"; var status ...
Monday, 8 February 2016
Wednesday, 27 January 2016
Creating responsive modal
Creating modal dialog window is easy, you need one button/link, few lines of HTML code, some css, and javascript call to opet and close it.
Button:
<button id="prijavadugme" type="submit" class="dugme single_add_to_cart_button button alt">Prijavi se</button>
HTML part:
<div id='dialogu' class="notify tltc ">
<div id='dialoger'>
<div id="modal" class="foodform">
<div id="datetexti">
Put your text or HTML here
</div>
<div id="concnotif">
</div>
<div class="buttonari cancela">
<p class="cart_navigation roundbutton showme">
<a id='closeding' href="#" class="button_large" title="Cancel">X</a>
</p>
</div>
</div>
</div>
</div>
Javascript part:
<script type="text/javascript">
function ShowAlert() {
var vtop = $(window).scrollTop(); /*Get document position*/
$('#dialoger').css("top", vtop+80); /*Set modal position, important for big dialog on mobile*/
$('#dialogu').show();
}
$(document).ready(function () {
$("#prijavadugme").click(function() {
ShowAlert();
})
$("#dialoger #closeding").click(function (e) {
e.preventDefault();
$("#dialogu").hide();
});
});
</script>
CSS part:
.notify #dialoger #modal {
background:white;
border: solid 2px #c4b173;
}
.notify input.goldbord {
color:#c4b173;
text-align:center;
padding:10px;
}
.notify .buttonari.cancela {
position: absolute;
top: -20px;
right: -20px;
}
.notify .cancela p.cart_navigation a.button_large {
padding-left:15px;
padding-right:15px;
}
div#datetexti {
padding: 20px;
}
#dialoger #content {
border-radius:8px;
background:#fff;
padding:20px;
}
@media (max-width: 480px) {
#dialoger #modal {
position: relative;
background: url(tint20.png) 0 0 repeat;
background: #c4b173;
border-radius: 0px;
padding: 8px;
z-index: 900;
padding: 1px;
min-width: 260px;
}
}
#dialogu {
display:none;
}
#dialoger {
display: block;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
z-index: 2;
top: 10%;
left: 50%;
right: 50%;
}
#dialoger p.cart_navigation a.button_large, form p.submit input:hover, #add_address p.submit2 input{
border: 1px solid #C4B073;
}
#dialoger #close {
position:absolute;
background:url(close.png) 0 0 no-repeat;
width:24px;
height:27px;
display:block;
text-indent:-9999px;
top:-7px;
right:-7px;
}
Button:
<button id="prijavadugme" type="submit" class="dugme single_add_to_cart_button button alt">Prijavi se</button>
HTML part:
<div id='dialogu' class="notify tltc ">
<div id='dialoger'>
<div id="modal" class="foodform">
<div id="datetexti">
Put your text or HTML here
</div>
<div id="concnotif">
</div>
<div class="buttonari cancela">
<p class="cart_navigation roundbutton showme">
<a id='closeding' href="#" class="button_large" title="Cancel">X</a>
</p>
</div>
</div>
</div>
</div>
Javascript part:
<script type="text/javascript">
function ShowAlert() {
var vtop = $(window).scrollTop(); /*Get document position*/
$('#dialoger').css("top", vtop+80); /*Set modal position, important for big dialog on mobile*/
$('#dialogu').show();
}
$(document).ready(function () {
$("#prijavadugme").click(function() {
ShowAlert();
})
$("#dialoger #closeding").click(function (e) {
e.preventDefault();
$("#dialogu").hide();
});
});
</script>
CSS part:
.notify #dialoger #modal {
background:white;
border: solid 2px #c4b173;
}
.notify input.goldbord {
color:#c4b173;
text-align:center;
padding:10px;
}
.notify .buttonari.cancela {
position: absolute;
top: -20px;
right: -20px;
}
.notify .cancela p.cart_navigation a.button_large {
padding-left:15px;
padding-right:15px;
}
div#datetexti {
padding: 20px;
}
#dialoger #content {
border-radius:8px;
background:#fff;
padding:20px;
}
@media (max-width: 480px) {
#dialoger #modal {
position: relative;
background: url(tint20.png) 0 0 repeat;
background: #c4b173;
border-radius: 0px;
padding: 8px;
z-index: 900;
padding: 1px;
min-width: 260px;
}
}
#dialogu {
display:none;
}
#dialoger {
display: block;
display: flex;
justify-content: center;
align-items: center;
position: fixed;
z-index: 2;
top: 10%;
left: 50%;
right: 50%;
}
#dialoger p.cart_navigation a.button_large, form p.submit input:hover, #add_address p.submit2 input{
border: 1px solid #C4B073;
}
#dialoger #close {
position:absolute;
background:url(close.png) 0 0 no-repeat;
width:24px;
height:27px;
display:block;
text-indent:-9999px;
top:-7px;
right:-7px;
}
Subscribe to:
Posts (Atom)