Update qtip configuration to 2.0
This commit is contained in:
+41
-34
@@ -33,10 +33,13 @@
|
|||||||
var content = $(this).next('.report-calculation');
|
var content = $(this).next('.report-calculation');
|
||||||
$(this).qtip({
|
$(this).qtip({
|
||||||
content: content,
|
content: content,
|
||||||
hide: { fixed: true, delay: 1000 },
|
hide: {
|
||||||
|
fixed: true,
|
||||||
|
delay: 1000
|
||||||
|
},
|
||||||
style: {
|
style: {
|
||||||
name: 'light',
|
width: 400,
|
||||||
width: 400
|
classes: "qtip-light"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -46,7 +49,7 @@
|
|||||||
$(this).qtip({
|
$(this).qtip({
|
||||||
content: "No previous log for this vehicle",
|
content: "No previous log for this vehicle",
|
||||||
style: {
|
style: {
|
||||||
name: 'red'
|
classes: "qtip-red"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -69,34 +72,35 @@
|
|||||||
|
|
||||||
$("input#EmployeeName").change(employeeHistoryKeydownHandler).keydown(employeeHistoryKeydownHandler);
|
$("input#EmployeeName").change(employeeHistoryKeydownHandler).keydown(employeeHistoryKeydownHandler);
|
||||||
|
|
||||||
employeeHistoryIconUpdate($("input#EmployeeName"), $("#icon-employee-history"));
|
if ($("input#EmployeeName").length > 0)
|
||||||
|
employeeHistoryIconUpdate($("input#EmployeeName"), $("#icon-employee-history"));
|
||||||
|
|
||||||
$("#icon-employee-history").qtip({
|
$("#icon-employee-history").qtip({
|
||||||
content: '<p class="loading">Recent Logs...</p>',
|
content: {
|
||||||
api: {
|
text: "<p class=\"loading\">Recent Logs...</p>",
|
||||||
beforeShow: function () {
|
},
|
||||||
var qt = this;
|
style: {
|
||||||
$.ajax(
|
width: 320,
|
||||||
{
|
classes: 'qtip-light'
|
||||||
|
},
|
||||||
|
hide: {
|
||||||
|
fixed: true,
|
||||||
|
delay: 500
|
||||||
|
},
|
||||||
|
events: {
|
||||||
|
show: function (event, api) {
|
||||||
|
$.ajax({
|
||||||
url: "CreateLog/RecentLogs",
|
url: "CreateLog/RecentLogs",
|
||||||
data: { employeeName: $("input#EmployeeName").val() },
|
data: {
|
||||||
success: function (data) {
|
employeeName: $("input#EmployeeName").val()
|
||||||
qt.updateContent(data, true);
|
},
|
||||||
|
success: function(data) {
|
||||||
|
api.set("content.text", data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
});
|
||||||
style: {
|
|
||||||
width: 320,
|
|
||||||
border: {
|
|
||||||
color: '#81B3B3'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
hide: {
|
|
||||||
fixed: true,
|
|
||||||
delay: 500
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if ($('input#VehicleId').length > 0) {
|
if ($('input#VehicleId').length > 0) {
|
||||||
// var settings = $('form').validate().settings;
|
// var settings = $('form').validate().settings;
|
||||||
@@ -116,16 +120,16 @@
|
|||||||
|
|
||||||
function bindQtipModal(element) {
|
function bindQtipModal(element) {
|
||||||
var corner = {
|
var corner = {
|
||||||
target: 'topLeft',
|
target: 'top left',
|
||||||
tooltip: 'bottomCenter'
|
tooltip: 'bottom center'
|
||||||
};
|
};
|
||||||
var tip = 'bottomLeft';
|
var tip = 'bottom left';
|
||||||
if (element.hasClass("below")) {
|
if (element.hasClass("below")) {
|
||||||
corner = {
|
corner = {
|
||||||
target: 'bottomMiddle',
|
target: 'bottom middle',
|
||||||
tooltip: 'topRight'
|
tooltip: 'top right'
|
||||||
};
|
};
|
||||||
tip = 'topRight';
|
tip = 'top right';
|
||||||
}
|
}
|
||||||
|
|
||||||
element.click(function () { return false; });
|
element.click(function () { return false; });
|
||||||
@@ -134,7 +138,10 @@ function bindQtipModal(element) {
|
|||||||
|
|
||||||
element.qtip({
|
element.qtip({
|
||||||
content: {
|
content: {
|
||||||
url: element.attr('href')
|
ajax: {
|
||||||
|
url: element.attr('href')
|
||||||
|
},
|
||||||
|
text: "<p class=\"loading\">Recent Logs...</p>"
|
||||||
},
|
},
|
||||||
hide: {
|
hide: {
|
||||||
fixed: true,
|
fixed: true,
|
||||||
@@ -144,7 +151,7 @@ function bindQtipModal(element) {
|
|||||||
corner: corner
|
corner: corner
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
name: 'light',
|
classes: 'qtip-light',
|
||||||
tip: tip,
|
tip: tip,
|
||||||
width: 300
|
width: 300
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user