From a6248b4aabdd539406feb3b65c7c42f416aca997 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Thu, 22 Aug 2013 06:39:28 -0400 Subject: [PATCH] Refactored hint feature. --- framework/yii/gii/assets/gii.js | 4 ++-- framework/yii/gii/assets/main.css | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/yii/gii/assets/gii.js b/framework/yii/gii/assets/gii.js index 6ea4f94..284006e 100644 --- a/framework/yii/gii/assets/gii.js +++ b/framework/yii/gii/assets/gii.js @@ -4,9 +4,9 @@ yii.gii = (function ($) { var initHintBlocks = function () { $('.hint-block').each(function () { var $hint = $(this); - $hint.parent().find('input,select,textarea').popover({ + $hint.parent().find('label').addClass('help').popover({ html: true, - trigger: 'focus', + trigger: 'hover', placement: 'right', content: $hint.html() }); diff --git a/framework/yii/gii/assets/main.css b/framework/yii/gii/assets/main.css index 3cd2986..36f5634 100644 --- a/framework/yii/gii/assets/main.css +++ b/framework/yii/gii/assets/main.css @@ -47,6 +47,11 @@ body { overflow: auto; } +.default-view .form-group label.help { + border-bottom: 1px dashed #888; + cursor: help; +} + .default-view .modal-dialog { width: 800px; }