Skip to content

Commit

Permalink
fixed clockpicker button style
Browse files Browse the repository at this point in the history
  • Loading branch information
Dani3lSun authored and Dani3lSun committed Mar 5, 2016
1 parent afeb52e commit c151d8e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 20 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ClockPicker is a item type plugin that gives you a nice clock-style overlay abov
It is based on JS Framework clockpicker (https://github.com/weareoutman/clockpicker).

##Changelog
####1.6.1 - fixed clockpicker button style

####1.6 - added possibility to show a clock button on right side

####1.5 - updated bootstrap to 3.3.6 and fixed css errors like issue #5
Expand Down
2 changes: 1 addition & 1 deletion apexplugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name" : "ClockPicker",
"version" : "1.6",
"version" : "1.6.1",
"description" : "ClockPicker is a item type plugin that gives you a nice clock-style overlay above of an input field. It is based on JS Framework clockpicker",
"keywords" : ["clockpicker", "timepicker", "time", "clock"],
"homepage" : "https://github.com/Dani3lSun/apex-plugin-clockpicker",
Expand Down
21 changes: 11 additions & 10 deletions source/item_type_plugin_de_danielh_clockpicker.sql
Original file line number Diff line number Diff line change
Expand Up @@ -36,34 +36,32 @@ wwv_flow_api.create_plugin(
,p_plsql_code=>wwv_flow_utilities.join(wwv_flow_t_varchar2(
'/*-------------------------------------',
' * ClockPicker Functions',
' * Version: 1.6 (04.03.2016)',
' * Version: 1.6.1 (05.03.2016)',
' * Author: Daniel Hochleitner',
' *-------------------------------------',
'*/',
'',
'FUNCTION render_clockpicker(p_item IN apex_plugin.t_page_item,',
' p_plugin IN apex_plugin.t_plugin,',
' p_value IN VARCHAR2,',
' p_is_readonly IN BOOLEAN,',
' p_is_printer_friendly IN BOOLEAN)',
' RETURN apex_plugin.t_page_item_render_result IS',
'',
' --',
' l_escaped_value VARCHAR2(1000);',
' -- plugin attributes',
' l_result apex_plugin.t_page_item_render_result;',
' l_name VARCHAR2(30);',
' l_placement VARCHAR2(50) := p_item.attribute_01;',
' l_align VARCHAR2(50) := p_item.attribute_02;',
' l_autoclose VARCHAR2(50) := p_item.attribute_03;',
' l_done_btn_text VARCHAR2(100) := p_item.attribute_04;',
' l_12h_mode VARCHAR2(50) := p_item.attribute_05;',
' l_suppress_soft_keyboards NUMBER := p_item.attribute_06;',
' l_show_clock_button NUMBER := p_item.attribute_07;',
'',
' -- other vars',
' l_name VARCHAR2(30);',
' l_escaped_value VARCHAR2(1000);',
' l_onload_string VARCHAR2(2000);',
' l_html_string VARCHAR2(2000);',
' l_element_item_id VARCHAR2(200);',
'',
' --',
'BEGIN',
' --',
' -- Printer Friendly Display',
Expand Down Expand Up @@ -104,9 +102,12 @@ wwv_flow_api.create_plugin(
' -- show clock button',
' IF l_show_clock_button = 1 THEN',
' l_html_string := l_html_string ||',
' ''<a class="a-Button a-Button--popupLOV '' ||',
' ''<a class="a-Button a-Button--popupLOV clockpicker-btn '' ||',
' l_element_item_id ||',
' ''_button" href="javascript:void(0);"><span class="fa fa-clock-o"></span></a>'';',
' -- button style',
' apex_css.add(p_css => ''.clockpicker-btn { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.125) inset !important; }'',',
' p_key => ''clockpicker_style'');',
' END IF;',
' -- write item html',
' htp.p(l_html_string);',
Expand Down Expand Up @@ -177,7 +178,7 @@ wwv_flow_api.create_plugin(
'Clockpicker item plugin for APEX',
'In 24h and 12h format.',
'Original from: http://weareoutman.github.io/clockpicker/'))
,p_version_identifier=>'1.6'
,p_version_identifier=>'1.6.1'
,p_about_url=>'https://github.com/Dani3lSun/apex-plugin-clockpicker'
,p_files_version=>25
);
Expand Down
19 changes: 10 additions & 9 deletions source/render_item.sql
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
/*-------------------------------------
* ClockPicker Functions
* Version: 1.6 (04.03.2016)
* Version: 1.6.1 (05.03.2016)
* Author: Daniel Hochleitner
*-------------------------------------
*/

FUNCTION render_clockpicker(p_item IN apex_plugin.t_page_item,
p_plugin IN apex_plugin.t_plugin,
p_value IN VARCHAR2,
p_is_readonly IN BOOLEAN,
p_is_printer_friendly IN BOOLEAN)
RETURN apex_plugin.t_page_item_render_result IS

--
l_escaped_value VARCHAR2(1000);
-- plugin attributes
l_result apex_plugin.t_page_item_render_result;
l_name VARCHAR2(30);
l_placement VARCHAR2(50) := p_item.attribute_01;
l_align VARCHAR2(50) := p_item.attribute_02;
l_autoclose VARCHAR2(50) := p_item.attribute_03;
l_done_btn_text VARCHAR2(100) := p_item.attribute_04;
l_12h_mode VARCHAR2(50) := p_item.attribute_05;
l_suppress_soft_keyboards NUMBER := p_item.attribute_06;
l_show_clock_button NUMBER := p_item.attribute_07;

-- other vars
l_name VARCHAR2(30);
l_escaped_value VARCHAR2(1000);
l_onload_string VARCHAR2(2000);
l_html_string VARCHAR2(2000);
l_element_item_id VARCHAR2(200);

--
BEGIN
--
-- Printer Friendly Display
Expand Down Expand Up @@ -68,9 +66,12 @@ BEGIN
-- show clock button
IF l_show_clock_button = 1 THEN
l_html_string := l_html_string ||
'<a class="a-Button a-Button--popupLOV ' ||
'<a class="a-Button a-Button--popupLOV clockpicker-btn ' ||
l_element_item_id ||
'_button" href="javascript:void(0);"><span class="fa fa-clock-o"></span></a>';
-- button style
apex_css.add(p_css => '.clockpicker-btn { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.125) inset !important; }',
p_key => 'clockpicker_style');
END IF;
-- write item html
htp.p(l_html_string);
Expand Down

0 comments on commit c151d8e

Please sign in to comment.