From 6926ce7948130e629517eb59671622a254321c64 Mon Sep 17 00:00:00 2001 From: Devin Price Date: Sat, 14 May 2011 16:37:18 -0500 Subject: [PATCH] Complete rewrite using Options Framework Plugin code as a base. --- admin/admin-functions.php | 89 -- admin/admin-interface.php | 1003 ------------------- admin/{ => css}/admin-style.css | 287 +++--- admin/images/favicon.ico | Bin 1150 -> 0 bytes admin/images/ico-delete.png | Bin 0 -> 715 bytes admin/images/icon_option.png | Bin 989 -> 0 bytes admin/images/loading-bottom.gif | Bin 1392 -> 0 bytes admin/images/ui-bg_flat_0_aaaaaa_40x100.png | Bin 180 -> 0 bytes admin/images/warning.png | Bin 308 -> 0 bytes admin/images/wrench.png | Bin 378 -> 0 bytes admin/js/ajaxupload.js | 682 ------------- admin/js/jquery.maskedinput-1.2.2.js | 252 ----- admin/js/of-medialibrary-uploader.js | 163 +++ admin/js/options-custom.js | 84 ++ admin/options-framework.php | 407 ++++++++ admin/options-interface.php | 310 ++++++ admin/options-medialibrary-uploader.php | 291 ++++++ admin/options-sanitize.php | 330 ++++++ admin/theme-functions.php | 109 -- admin/theme-options.php | 252 ----- changelog.txt | 36 +- footer.php | 63 -- functions.php | 16 +- header.php | 98 -- admin/images/accept.png => images/1col.png | Bin 2915 -> 2895 bytes {admin/images => images}/2cl.png | Bin {admin/images => images}/2cr.png | Bin {admin/images => images}/3cm.png | Bin {admin/images => images}/3cr.png | Bin index.php | 191 ++++ options.php | 189 ++++ readme.txt | 4 + screenshot.png | Bin 2846 -> 6087 bytes style.css | 41 +- styles/default.css | 0 35 files changed, 2108 insertions(+), 2789 deletions(-) delete mode 100755 admin/admin-functions.php delete mode 100755 admin/admin-interface.php rename admin/{ => css}/admin-style.css (57%) delete mode 100755 admin/images/favicon.ico create mode 100755 admin/images/ico-delete.png delete mode 100755 admin/images/icon_option.png delete mode 100755 admin/images/loading-bottom.gif delete mode 100755 admin/images/ui-bg_flat_0_aaaaaa_40x100.png delete mode 100755 admin/images/warning.png delete mode 100755 admin/images/wrench.png delete mode 100755 admin/js/ajaxupload.js delete mode 100755 admin/js/jquery.maskedinput-1.2.2.js create mode 100755 admin/js/of-medialibrary-uploader.js create mode 100755 admin/js/options-custom.js create mode 100755 admin/options-framework.php create mode 100755 admin/options-interface.php create mode 100755 admin/options-medialibrary-uploader.php create mode 100755 admin/options-sanitize.php delete mode 100755 admin/theme-functions.php delete mode 100755 admin/theme-options.php delete mode 100644 footer.php delete mode 100644 header.php rename admin/images/accept.png => images/1col.png (92%) rename {admin/images => images}/2cl.png (100%) rename {admin/images => images}/2cr.png (100%) rename {admin/images => images}/3cm.png (100%) rename {admin/images => images}/3cr.png (100%) create mode 100755 index.php create mode 100755 options.php delete mode 100755 styles/default.css diff --git a/admin/admin-functions.php b/admin/admin-functions.php deleted file mode 100755 index 725d73d..0000000 --- a/admin/admin-functions.php +++ /dev/null @@ -1,89 +0,0 @@ - - - \ No newline at end of file diff --git a/admin/admin-interface.php b/admin/admin-interface.php deleted file mode 100755 index 9ecb519..0000000 --- a/admin/admin-interface.php +++ /dev/null @@ -1,1003 +0,0 @@ - 1){ $query_inner .= ' OR '; } - if($option_type == 'multicheck'){ - $multicount = 0; - foreach($option['options'] as $option_key => $option_option){ - $multicount++; - if($multicount > 1){ $query_inner .= ' OR '; } - $query_inner .= "option_name = '" . $option_id . "_" . $option_key . "'"; - - } - - } else if(is_array($option_type)) { - $type_array_count = 0; - foreach($option_type as $inner_option){ - $type_array_count++; - $option_id = $inner_option['id']; - if($type_array_count > 1){ $query_inner .= ' OR '; } - $query_inner .= "option_name = '$option_id'"; - } - - } else { - $query_inner .= "option_name = '$option_id'"; - } - } - - } - - //When Theme Options page is reset - Add the of_options option - if($page == 'optionsframework'){ - $query_inner .= " OR option_name = 'of_options'"; - } - - //echo $query_inner; - - $query = "DELETE FROM $wpdb->options WHERE $query_inner"; - $wpdb->query($query); - -} - - -/*-----------------------------------------------------------------------------------*/ -/* Build the Options Page - optionsframework_options_page */ -/*-----------------------------------------------------------------------------------*/ - -function optionsframework_options_page(){ - $options = get_option('of_template'); - $themename = get_option('of_themename'); -?> - -
-
-
Options Updated
-
-
-
Options Reset
-
-
- - -
-
-
    - -
-
-
-
-
-
- - - -
- - - - -
-
- -
-
- - - - - - - -options WHERE option_name LIKE '$id'"; - $wpdb->query($query); - - } - elseif ($save_type == 'options' OR $save_type == 'framework') { - $data = $_POST['data']; - - parse_str($data,$output); - //print_r($output); - - //Pull options - $options = get_option('of_template'); - - foreach($options as $option_array){ - - $id = $option_array['id']; - $old_value = get_option($id); - $new_value = ''; - - if(isset($output[$id])){ - $new_value = $output[$option_array['id']]; - } - - if(isset($option_array['id'])) { // Non - Headings... - - - $type = $option_array['type']; - - if ( is_array($type)){ - foreach($type as $array){ - if($array['type'] == 'text'){ - $id = $array['id']; - $std = $array['std']; - $new_value = $output[$id]; - if($new_value == ''){ $new_value = $std; } - update_option( $id, stripslashes($new_value)); - } - } - } - elseif($new_value == '' && $type == 'checkbox'){ // Checkbox Save - - update_option($id,'false'); - } - elseif ($new_value == 'true' && $type == 'checkbox'){ // Checkbox Save - - update_option($id,'true'); - } - elseif($type == 'multicheck'){ // Multi Check Save - - $option_options = $option_array['options']; - - foreach ($option_options as $options_id => $options_value){ - - $multicheck_id = $id . "_" . $options_id; - - if(!isset($output[$multicheck_id])){ - update_option($multicheck_id,'false'); - } - else{ - update_option($multicheck_id,'true'); - } - } - } - elseif($type == 'typography'){ - - $typography_array = array(); - - $typography_array['size'] = $output[$option_array['id'] . '_size']; - - $typography_array['face'] = stripslashes($output[$option_array['id'] . '_face']); - - $typography_array['style'] = $output[$option_array['id'] . '_style']; - - $typography_array['color'] = $output[$option_array['id'] . '_color']; - - update_option($id,$typography_array); - - } - elseif($type == 'border'){ - - $border_array = array(); - - $border_array['width'] = $output[$option_array['id'] . '_width']; - - $border_array['style'] = $output[$option_array['id'] . '_style']; - - $border_array['color'] = $output[$option_array['id'] . '_color']; - - update_option($id,$border_array); - - } - elseif($type != 'upload_min'){ - - update_option($id,stripslashes($new_value)); - } - } - } - - } - - die(); - -} - - - -/*-----------------------------------------------------------------------------------*/ -/* Generates The Options Within the Panel - optionsframework_machine */ -/*-----------------------------------------------------------------------------------*/ - -function optionsframework_machine($options) { - - $counter = 0; - $menu = ''; - $output = ''; - foreach ($options as $value) { - - $counter++; - $val = ''; - //Start Heading - if ( $value['type'] != "heading" ) - { - $class = ''; if(isset( $value['class'] )) { $class = $value['class']; } - //$output .= '
'."\n".'
'."\n"; - $output .= '
'."\n"; - $output .= '

'. $value['name'] .'

'."\n"; - $output .= '
'."\n" . '
'."\n"; - - } - //End Heading - $select_value = ''; - switch ( $value['type'] ) { - - case 'text': - $val = $value['std']; - $std = get_option($value['id']); - if ( $std != "") { $val = $std; } - $output .= ''; - break; - - case 'select': - - $output .= ''; - - - break; - case 'select2': - - $output .= ''; - - - break; - case 'textarea': - - $cols = '8'; - $ta_value = ''; - - if(isset($value['std'])) { - - $ta_value = $value['std']; - - if(isset($value['options'])){ - $ta_options = $value['options']; - if(isset($ta_options['cols'])){ - $cols = $ta_options['cols']; - } else { $cols = '8'; } - } - - } - $std = get_option($value['id']); - if( $std != "") { $ta_value = stripslashes( $std ); } - $output .= ''; - - - break; - case "radio": - - $select_value = get_option( $value['id']); - - foreach ($value['options'] as $key => $option) - { - - $checked = ''; - if($select_value != '') { - if ( $select_value == $key) { $checked = ' checked'; } - } else { - if ($value['std'] == $key) { $checked = ' checked'; } - } - $output .= '' . $option .'
'; - - } - - break; - case "checkbox": - - $std = $value['std']; - - $saved_std = get_option($value['id']); - - $checked = ''; - - if(!empty($saved_std)) { - if($saved_std == 'true') { - $checked = 'checked="checked"'; - } - else{ - $checked = ''; - } - } - elseif( $std == 'true') { - $checked = 'checked="checked"'; - } - else { - $checked = ''; - } - $output .= ''; - - break; - case "multicheck": - - $std = $value['std']; - - foreach ($value['options'] as $key => $option) { - - $of_key = $value['id'] . '_' . $key; - $saved_std = get_option($of_key); - - if(!empty($saved_std)) - { - if($saved_std == 'true'){ - $checked = 'checked="checked"'; - } - else{ - $checked = ''; - } - } - elseif( $std == $key) { - $checked = 'checked="checked"'; - } - else { - $checked = ''; } - $output .= '
'; - - } - break; - case "upload": - - $output .= optionsframework_uploader_function($value['id'],$value['std'],null); - - break; - case "upload_min": - - $output .= optionsframework_uploader_function($value['id'],$value['std'],'min'); - - break; - case "color": - $val = $value['std']; - $stored = get_option( $value['id'] ); - if ( $stored != "") { $val = $stored; } - $output .= '
'; - $output .= ''; - break; - - case "typography": - - $default = $value['std']; - $typography_stored = get_option($value['id']); - - /* Font Size */ - $val = $default['size']; - if ( $typography_stored['size'] != "") { $val = $typography_stored['size']; } - $output .= ''; - - /* Font Face */ - $val = $default['face']; - if ( $typography_stored['face'] != "") - $val = $typography_stored['face']; - - $font01 = ''; - $font02 = ''; - $font03 = ''; - $font04 = ''; - $font05 = ''; - $font06 = ''; - $font07 = ''; - $font08 = ''; - $font09 = ''; - - if (strpos($val, 'Arial, sans-serif') !== false){ $font01 = 'selected="selected"'; } - if (strpos($val, 'Verdana, Geneva') !== false){ $font02 = 'selected="selected"'; } - if (strpos($val, 'Trebuchet') !== false){ $font03 = 'selected="selected"'; } - if (strpos($val, 'Georgia') !== false){ $font04 = 'selected="selected"'; } - if (strpos($val, 'Times New Roman') !== false){ $font05 = 'selected="selected"'; } - if (strpos($val, 'Tahoma, Geneva') !== false){ $font06 = 'selected="selected"'; } - if (strpos($val, 'Palatino') !== false){ $font07 = 'selected="selected"'; } - if (strpos($val, 'Helvetica') !== false){ $font08 = 'selected="selected"'; } - - $output .= ''; - - /* Font Weight */ - $val = $default['style']; - if ( $typography_stored['style'] != "") { $val = $typography_stored['style']; } - $normal = ''; $italic = ''; $bold = ''; $bolditalic = ''; - if($val == 'normal'){ $normal = 'selected="selected"'; } - if($val == 'italic'){ $italic = 'selected="selected"'; } - if($val == 'bold'){ $bold = 'selected="selected"'; } - if($val == 'bold italic'){ $bolditalic = 'selected="selected"'; } - - $output .= ''; - - /* Font Color */ - $val = $default['color']; - if ( $typography_stored['color'] != "") { $val = $typography_stored['color']; } - $output .= '
'; - $output .= ''; - - break; - - case "border": - - $default = $value['std']; - $border_stored = get_option( $value['id'] ); - - /* Border Width */ - $val = $default['width']; - if ( $border_stored['width'] != "") { $val = $border_stored['width']; } - $output .= ''; - - /* Border Style */ - $val = $default['style']; - if ( $border_stored['style'] != "") { $val = $border_stored['style']; } - $solid = ''; $dashed = ''; $dotted = ''; - if($val == 'solid'){ $solid = 'selected="selected"'; } - if($val == 'dashed'){ $dashed = 'selected="selected"'; } - if($val == 'dotted'){ $dotted = 'selected="selected"'; } - - $output .= ''; - - /* Border Color */ - $val = $default['color']; - if ( $border_stored['color'] != "") { $val = $border_stored['color']; } - $output .= '
'; - $output .= ''; - - break; - - case "images": - $i = 0; - $select_value = get_option( $value['id']); - - foreach ($value['options'] as $key => $option) - { - $i++; - - $checked = ''; - $selected = ''; - if($select_value != '') { - if ( $select_value == $key) { $checked = ' checked'; $selected = 'of-radio-img-selected'; } - } else { - if ($value['std'] == $key) { $checked = ' checked'; $selected = 'of-radio-img-selected'; } - elseif ($i == 1 && !isset($select_value)) { $checked = ' checked'; $selected = 'of-radio-img-selected'; } - elseif ($i == 1 && $value['std'] == '') { $checked = ' checked'; $selected = 'of-radio-img-selected'; } - else { $checked = ''; } - } - - $output .= ''; - $output .= ''; - $output .= '
'. $key .'
'; - $output .= ''; - $output .= '
'; - - } - - break; - - case "info": - $default = $value['std']; - $output .= $default; - break; - - case "heading": - - if($counter >= 2){ - $output .= '
'."\n"; - } - $jquery_click_hook = ereg_replace("[^A-Za-z0-9]", "", strtolower($value['name']) ); - $jquery_click_hook = "of-option-" . $jquery_click_hook; - $menu .= '
  • '. $value['name'] .'
  • '; - $output .= '

    '.$value['name'].'

    '."\n"; - break; - } - - // if TYPE is an array, formatted into smaller inputs... ie smaller values - if ( is_array($value['type'])) { - foreach($value['type'] as $array){ - - $id = $array['id']; - $std = $array['std']; - $saved_std = get_option($id); - if($saved_std != $std){$std = $saved_std;} - $meta = $array['meta']; - - if($array['type'] == 'text') { // Only text at this point - - $output .= ''; - $output .= ''.$meta.''; - } - } - } - if ( $value['type'] != "heading" ) { - if ( $value['type'] != "checkbox" ) - { - $output .= '
    '; - } - if(!isset($value['desc'])){ $explain_value = ''; } else{ $explain_value = $value['desc']; } - $output .= '
    '. $explain_value .'
    '."\n"; - $output .= '
    '."\n"; - } - - } - $output .= '
    '; - return array($output,$menu); - -} - - - -/*-----------------------------------------------------------------------------------*/ -/* OptionsFramework Uploader - optionsframework_uploader_function */ -/*-----------------------------------------------------------------------------------*/ - -function optionsframework_uploader_function($id,$std,$mod){ - - //$uploader .= ''; - //$uploader .= ''; - - $uploader = ''; - $upload = get_option($id); - - if($mod != 'min') { - $val = $std; - if ( get_option( $id ) != "") { $val = get_option($id); } - $uploader .= ''; - } - - $uploader .= '
    Upload Image'; - - if(!empty($upload)) {$hide = '';} else { $hide = 'hide';} - - $uploader .= 'Remove'; - $uploader .='
    ' . "\n"; - $uploader .= '
    ' . "\n"; - if(!empty($upload)){ - $uploader .= ''; - $uploader .= ''; - $uploader .= ''; - } - $uploader .= '
    ' . "\n"; - - -return $uploader; -} - -?> diff --git a/admin/admin-style.css b/admin/css/admin-style.css similarity index 57% rename from admin/admin-style.css rename to admin/css/admin-style.css index f0dbb91..17a942f 100755 --- a/admin/admin-style.css +++ b/admin/css/admin-style.css @@ -2,17 +2,17 @@ /* OptionsFramework Admin Styles */ /*-------------------------------------------------------------------------------------------*/ -.updated, .error { - display:none!important -} /* disable the admin notices */ +.updated { + width:770px; +} #of_container { - margin: 15px; + margin: 10px 0; width: 785px; position:relative; z-index: 0 } #of_container #header { - height: 80px; + height: 60px; background:#dfdfdf url("../../../../wp-admin/images/gray-grad.png") repeat-x left top; border: 1px solid #ccc; border-top-left-radius: 6px; @@ -24,26 +24,12 @@ } #of_container #header .logo { float: left; - margin:10px 20px; -} -#of_container #js-warning { - color: red; - float: left; - margin: 20px 10px; - width: 330px; + margin:5px 20px; } -.js #of_container #js-warning { - display: none; - } #of_container #header .logo h2 { font-style:normal; -} -#of_container #header .icon-option { - float: right; - height: 32px; - width: 32px; - background: url(images/icon_option.png) no-repeat; - margin:25px 20px; + font-size: 22px; + line-height: 26px; } #of_container #main { background-color: #f1f1f1; @@ -75,11 +61,10 @@ } #of_container #content { float: left; - min-height: 550px; + min-height: 560px; width: 595px; margin-left: -1px; padding: 0 14px; - font-family: "Lucida Grande", Sans-serif; background-color: #fff; border-left: 1px solid #d8d8d8; } @@ -115,40 +100,6 @@ #of_container #content .section-color .explain { width:440px } -#of_container #content .section-info h3.heading { - font-size: 12px; - font-weight: 100; - border: 0; - margin-top: 20px; - letter-spacing: 1px; - border-top: 1px solid #FFF298; - margin-bottom: 0; - background:#EFE186; - padding: 10px 20px; -} -#of_container #content .section-info .controls { - margin: 0 0 20px; - padding: 15px 20px; - width: auto; - line-height: 1.5em; - font-size: 14px; - font-style: italic; - font-family: Georgia, arial; - background: #FFF298; - border:1px solid #ECD852; - color:#424242; -} -#of_container #content .section-info .controls small { - font-size: 12px -} -#of_container #content .section-info h3.heading { - -moz-border-radius-topleft:4px; - -moz-border-radius-topright:4px; -} -#of_container #content .section-info .controls { - -moz-border-radius-bottomleft:4px; - -moz-border-radius-bottomright:4px; -} #of_container textarea, #of_container input, #of_container select { -moz-border-radius-bottomleft:4px; -moz-border-radius-bottomright:4px; @@ -158,13 +109,12 @@ border-width:1px; } #of_container .controls input, #of_container .controls select, #of_container .controls textarea { - margin-bottom: 9px !important; + margin-bottom: 10px; background-color: #f1f1f1; border: 1px solid; border-color: #ccc #e6e6e6 #e6e6e6 #ccc; width: 340px; padding: 4px; - font-family: "Lucida Grande", "Lucida Sans Unicode", Arial, Verdana, sans-serif; font-size: 12px; } #of_container .controls select { @@ -183,17 +133,10 @@ #of_container input.of-radio { width: 30px; } -#of_container .controls .input-text-small { - width: 60px; - margin-right:10px -} -#of_container .meta-two { - margin-right:10px -} #of_container .controls .of-color { float:left; width: 80px; - margin-left:5px; /* font-size:20px; height:34px;*/ + margin-left:5px; } #of_container #content .section-typography .controls { width:425px @@ -217,6 +160,30 @@ width:80px; float:left } +#of_container #content .section-background .controls { + width:425px +} +#of_container #content .section-background .explain { + width:140px +} +#of_container .of-background-properties { + margin-top: 18px; +} +#of_container .controls .of-background-repeat { + width:160px; + float:left +} +#of_container .controls .of-background-position { + width:125px; + float:left +} +#of_container .controls .of-background-attachment { + width:125px; + float:left +} +#of_container div.section-background .controls input.upload { + width: 240px; +} #of_container .controls .of-radio-img-img { border:3px solid #fff; margin:0 5px 10px 0; @@ -248,69 +215,92 @@ #of_container .controls input:focus, #of_container select:focus, #of_container textarea:focus { background:#fff; } -#of_container .accept { - background: #DBF6BE no-repeat 10px center; - border: solid #9BBF65; - border-width: 0px 1px 1px 1px; - color: #060; - font-weight: bold; - padding: 10px; - text-align: center; -} -#of_container .warning { - background: #ffeeee no-repeat 10px center; - border: solid #dfbfbf; - border-width: 0px 1px 1px 1px; - color: #333; - font-weight: bold; - padding: 10px; - text-align: center; -} -#of_container .of-save-popup { - position:absolute; - -moz-border-radius:12px; - -webkit-border-radius:12px; - border-radius:12px; - background:rgba(0, 0, 0, 0.4); - color:#fff; - font-size:24px; - text-align:center; - display:none -} -#of_container .of-save-save { - background:url(images/accept.png) 20px 50% no-repeat; - padding:30px 30px 30px 70px -} -#of_container .of-save-reset { - background:url(images/warning.png) 20px 50% no-repeat; - padding:30px 30px 30px 70px -} -.upload_button_div { - margin-bottom: 10px; +#of_container .hide { + display:none; +} +#of_container .of-option-image { + max-width:340px; + margin:3px 0 18px 0; } -.upload_button_div .button { - padding:4px 14px; +#of_container .mini .controls select, #of_container #content .section .mini .controls { + width: 70px; +} +#of_container .mini .controls input, #of_container #content .mini .controls { + width: 70px; } -.upload_button_div .image_reset_button { - margin-left:10px +#of_container #content .mini .explain { + width:500px; } -.upload-error { + +/* Image Uploader */ + +#of_container .controls input.upload { + width:280px; + padding-bottom:6px; +} +#of_container .controls input.upload_button { + float:right; + width:45px; + border-color:#BBBBBB; + cursor:pointer; + height:16px; +} +#of_container .controls input.upload_button:hover { + border-color:#666666; + color:#000; +} +#of_container .screenshot { float:left; - color:#666; - font-size:10px; - font-weight:bold; - text-decoration:none; - text-shadow:1px 1px 0 #FFFFFF; - margin: 0 10px 0 0; - padding:3px 10px; - background:#FFDFEC; + margin-left:1px; + position:relative; + width:344px; + margin-top:3px; +} +#of_container .section-background .screenshot { + margin-bottom:18px; +} +#of_container .screenshot img { -moz-border-radius:4px; - -webkit-border:4px; + -webkit-border-radius:4px; + -border-radius:4px; + background:#FAFAFA; + border-color:#ccc #eee #eee #ccc; + border-style:solid; + border-width:1px; + float:left; + max-width:334px; + padding:4px; +} +#of_container .screenshot .mlu_remove { + background:url("../images/ico-delete.png") no-repeat; + border:medium none; + bottom:-4px; + display:block; + float:left; + height:16px; + padding:0; + position:absolute; + left:-4px; + text-indent:-9999px; + width:16px; } -.reset-button { +#of_container .screenshot .no_image .file_link { + margin-left: 20px; +} +#of_container .screenshot .no_image .mlu_remove { + bottom: 0px; +} +#of_container .reset-button { float:left; + cursor:pointer; +} + +/* Bottom Section */ + +#of_container .button-primary { + float:right; } -.save_bar_top { +#of_container .of_admin_bar { background: #f3f3f3; border:solid #ccc; border-width:0px 1px 1px 1px; @@ -323,55 +313,4 @@ -webkit-border-bottom-left-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; -} - -.hide { - display:none -} -.ajax-loading-img-top { - margin: 8px 4px 0; - float:left -} -.ajax-loading-img-bottom { -} -.of-option-image { - max-width:340px; -} -#of_container .mini .controls select, #of_container #content .section .mini .controls { - width: 70px; -} -#of_container .mini .controls input, #of_container #content .mini .controls { - width: 70px; -} -#of_container #content .mini .explain { - width:500px; -} -.of-notice { - background: #ffd1d1; - border:1px solid #DFA8A7; - -moz-border-radius:8px; - -webkit-border-radius:8px; - text-align: center; - margin-bottom: 15px -} -/*-------------------------------------------------------------------------------------------*/ -/* GENERAL STYLES */ -/*-------------------------------------------------------------------------------------------*/ - -/* http://sonspring.com/journal/clearing-floats */ - -html body * span.clear, html body * div.clear, html body * li.clear, html body * dd.clear { - background: none; - border: 0; - clear: both; - display: block; - float: none; - font-size: 0; - list-style: none; - margin: 0; - padding: 0; - overflow: hidden; - visibility: hidden; - width: 0; - height: 0; } \ No newline at end of file diff --git a/admin/images/favicon.ico b/admin/images/favicon.ico deleted file mode 100755 index 3243327d411ff1f6e740ae67537592cf9baa137c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1150 zcmZvWp-Kc{6ovlj3OS~gGKvTxv+tYb1dkFa1CjDu;a z?Rq}B7lvV1&i?1#`<>&aG}B*}C4KVrxR=s_+=;|0muCOpGCMx=`8-WjYHp=L>Rfns z+@^fYnX_c79UQypgN+<7^Hy5AFZ4E&xwyd~n3$u3UiO9G7CuLw-%ges3@jP)rTe%K zzR&eWo<3N5=zt|pmR%*$3ExQE$-~gcTuAi5z*Z7j?sRV@Zgj$J{EfbE&Gf*-lEHWG z$-=O2-NP3WecbVld$`Vp=f081;1N8x#^+jZpLgCj>To-FrHVo&cN1wVar=U~Z@4Nqqw(J{@%Oa>k{JaZX#SeQ)-4VfKD%_Ihvjurj;8F}wPd);}M2 a>%;Ep`K)_6O7+`*s$u*7_WbwQF8=@w|E|9P diff --git a/admin/images/ico-delete.png b/admin/images/ico-delete.png new file mode 100755 index 0000000000000000000000000000000000000000..08f249365afd29594b51210c6e21ba253897505d GIT binary patch literal 715 zcmV;+0yO=JP)C4}Mrzlg<+1Y8PEBfUp0jJpx4B>@E+cy3`^(Gw`Mf+2&yxZm<$to~Vpgvg&QKNR z_f#1(r6svZt%iF?s+n<8X?B&!h3g9Dbb8_=MX}!;HiQSAh`bp^WMl~Z-44teO7W_Y zV4thSL{h;rJY7!l3%5J4H1!tIzB`Dv+YxO(haWeausGZYkI8^hWj6mzo=L0{%;yxzh{5!Htr?51 zvG|W62MzC8BZ76hRpCyO2zOn<%e)K>NHge!-~)Ap33OdWw6hsLYbCxGNt0%wk_2z7 zfyYvXheSG)5HRK1VB~%mq7Dmurw#bi@hEcOr3&G1ZiF*$M=&9nB#VNf&Q^r$4G5kp zTURh&s)E0%5&hyVD}sp<72~zmAY`Y(9aqO6CXF%=zFHGzO-A&I(pE}v70YQxCPJ{Y z4L+?5-crdLn3ZRPEs!A4ehEY3ZRpL~w9>@aMN+{F4dI@v&>(QDHQum!mG~E^$OS8l z!7?%Uwib*ROP67Hw`ika)gX-(8Ia`-u_IEhxG7U<13kSsMW+$lbb2dUMm5p6pa}cjgA+U$^mJ^AjD?&bdi)8~y+Q002ovPDHLkV1g8IMc@Dc literal 0 HcmV?d00001 diff --git a/admin/images/icon_option.png b/admin/images/icon_option.png deleted file mode 100755 index 970706065e396694ef0703e0ddd855f37ed6e095..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 989 zcmV<310wv1P)hWx$&9AZp4IC z(U5K|TC5NY7P_=MDRrR~q>KKBF8u-h1@2lbLKbQfDpZPgAAf;h8yCGaE2~B$Hm}Y% z&cwN9?%dSSI53&}I63E=@4V((wOWnta#%}COV8N)E|Ey2+iBQwoGe@3+UzIudT}u} zGBVQEo#%47^oNy|3;=NBpEft!3gE@;EHTz&wtNr_2Ja*Wt^ouBEh#D#3iQ))==}WL z^}M&Ym+mJL6p2L400J5Y`uqFIvMjFr;^M*x;72Y;^YinR93FN*KRl#NCPNbw6J`Lm z20)mh|FXSJCnqQTzOS#39*&M`6_rXQs#dG?b!VpzHXIJq(9jTnXM4E#+6A`Vn4`=s zFy7hO$?tKklam894-O7eK)4ftQpu#JeqROxjDC#n?ry$bUS4|cM8-irpQqE)Q+^+f zM#&b2{Ta{*SYjuj665&z*qAL~0F;-@5PZTz@d6p_GTuo00!-03-wd1i+Mr&APzS zFwmL{G%;XgK*%=}w7v}dVij#~Z;xMRv)TId&s$rRPNyjzi+M5-3WaXL027qwL#*F+ zcj@KaoVL5It*z0kg@s0Kn)9XP5M9+03|R`Zu67K=e6l7|WGUp;-Ed#k7}FhZAt#N4 zAr(ji129;rRO&l1bvIe>UB=k^n*;g~8<>_j_^8?CX5dN-RfHl_cSDc&0wB*1QVwx| z-J>OARS!S5n!}*p5;5S{-LwGMZes%jw7 z1gjz?O=+gJeWN&m2~Itm(vAwiIXE~-q}Yy0L0qp1t$uteMM$jy%qG4M9RPUqadq`Q zg0{^cMS0i;9E5p9%qW}p5E6=OtX8bB7*a{B;B3n#3QGa=uK)u8>*Pldcz`0w00000 LNkvXXu0mjf^rOQF diff --git a/admin/images/loading-bottom.gif b/admin/images/loading-bottom.gif deleted file mode 100755 index e1469616717a8051a4373bc4cb887436c4eba76a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1392 zcmb`F>rYz+7>7^W(^{adEo*zu4n6B>3ka2)L?&o7&?{iu0j_{}iB$@8Zcy$BTSi4@ zX#s(C&>>^A6tRm7Gf{)`fjX#yjGNHPxFkS?1c6UP6TdhQh9w&NP2WG@&6DT(DKiww zDLN*=1bzhov)OF1SlZg!Y&KhOZ*PBpztib-xm+V7Bcr3EQu| zAm$k5*b6{5Zbr2C=sTlQQs!*!xz%ZE(v7DwP;a;|v}G$*AO}s~>$mGckkzGkOtpwD z%}Ku@9C-_2a10L5yaqU}0Icc!!1Z*tOnD>TEnMPID@CE;i{YW^nNPNys}*t?bgq*4 z9G#IH)ztV#lqy~j2%;Q^C^Wq3cjgb5Xn*2@Yrg7;Y8ch?Zc!-{I0S)i89MD(xH<0Y z)0?l~Te2o*(%{(dFjFGPjFovjmT=3kMku*stbE8CN^P_zgXBCRiK2abFN{z>AOpih0F|V+SeJ!;|jSZwFw%D2+(r4f(biyQQrGDzS zMq*~BG{oz3_kB2}W3p_;LZB)!dMlcJrd`S6hgD*A`OPwv4Dw_=klZOL zDna-cE|$vpS8ObKWld;oAiVOtZD) zWfZuSu01MMIQer|es;{g^pc|-ZX|`KrjdfuaTGO`Kv9W;P&FE4lya^}xjeM)GFiwg zf?7ZbHGvjqgSbrDMR?|BTgp9LpUneFM)u`H!9IHS`9}pXSYfokEc&kY=HQD=u(;7 zBEXp<=xQ@KI3`0;Wk8_n$3V^akZYd*Ydwv2nP#x_7nmlFwN1x91EQ4=4yQ7#`R^ z$vje}bP0l+XkK DSH>_4 diff --git a/admin/images/warning.png b/admin/images/warning.png deleted file mode 100755 index 734031d0b5fcfc06234d32dfec3700dc065d5a86..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 308 zcmeAS@N?(olHy`uVBq!ia0vp^5!3HF|Hk`EvQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>JimrLOIEGZ*N-8NVOjHn3Vfa|1VJ+ApF0i<>)8nw{1fKMU zO``JjO77` zRF0#l!zxy$BW_BH^Nl7hILN>*y}o%y0Sm90{^QLI%k9*3^j;o+s9i0SlX9W|U2zHb z2UTk)I|u)35@G_UEZ71}`6_e{oS31blJ@tn$`UQt6nPVYz>37vCx3V~u+3m)d-2ds zmBHw8L+245SFIW6ofHmDI9P9_!|?k76K`z+qrw3O#}YYJ-kOE`fIejKboFyt=akR{ E06D>FWB>pF diff --git a/admin/images/wrench.png b/admin/images/wrench.png deleted file mode 100755 index a771bcd5d431b1547e5bfcf31cdf4bec27057c53..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 378 zcmV-=0fqjFP)oS%Gjh>U1I zL13g`iI0bG0|DgSvc5{R4&O=Q34!F=a!V$vT@OkmVUP=y$w^``9RibFkA}f^2ocD8 z7XhraB8wagq|3#a5p1nE`;zO6W}1qEv|^6FU3|%P29<>zw_>}cEHs1C!!LKW;#vkN zn&*2*ghR;C0`gd>>wVi=hP4vWx@wUzh5%TiEe*3pa7sj 1) { - clientTop = 0; - clientLeft = 0; - } - - var top = box.top / zoom + (window.pageYOffset || docElem && docElem.scrollTop / zoom || body.scrollTop / zoom) - clientTop, left = box.left / zoom + (window.pageXOffset || docElem && docElem.scrollLeft / zoom || body.scrollLeft / zoom) - clientLeft; - - return { - top: top, - left: left - }; - }; - } else { - // Get offset adding all offsets - var getOffset = function(el){ - var top = 0, left = 0; - do { - top += el.offsetTop || 0; - left += el.offsetLeft || 0; - el = el.offsetParent; - } while (el); - - return { - left: left, - top: top - }; - }; - } - - /** - * Returns left, top, right and bottom properties describing the border-box, - * in pixels, with the top-left relative to the body - * @param {Element} el - * @return {Object} Contains left, top, right,bottom - */ - function getBox(el){ - var left, right, top, bottom; - var offset = getOffset(el); - left = offset.left; - top = offset.top; - - right = left + el.offsetWidth; - bottom = top + el.offsetHeight; - - return { - left: left, - right: right, - top: top, - bottom: bottom - }; - } - - /** - * Helper that takes object literal - * and add all properties to element.style - * @param {Element} el - * @param {Object} styles - */ - function addStyles(el, styles){ - for (var name in styles) { - if (styles.hasOwnProperty(name)) { - el.style[name] = styles[name]; - } - } - } - - /** - * Function places an absolutely positioned - * element on top of the specified element - * copying position and dimentions. - * @param {Element} from - * @param {Element} to - */ - function copyLayout(from, to){ - var box = getBox(from); - - addStyles(to, { - position: 'absolute', - left : box.left + 'px', - top : box.top + 'px', - width : from.offsetWidth + 'px', - height : from.offsetHeight + 'px' - }); - } - - /** - * Creates and returns element from html chunk - * Uses innerHTML to create an element - */ - var toElement = (function(){ - var div = document.createElement('div'); - return function(html){ - div.innerHTML = html; - var el = div.firstChild; - return div.removeChild(el); - }; - })(); - - /** - * Function generates unique id - * @return unique id - */ - var getUID = (function(){ - var id = 0; - return function(){ - return 'ValumsAjaxUpload' + id++; - }; - })(); - - /** - * Get file name from path - * @param {String} file path to file - * @return filename - */ - function fileFromPath(file){ - return file.replace(/.*(\/|\\)/, ""); - } - - /** - * Get file extension lowercase - * @param {String} file name - * @return file extenstion - */ - function getExt(file){ - return (-1 !== file.indexOf('.')) ? file.replace(/.*[.]/, '') : ''; - } - - function hasClass(el, name){ - var re = new RegExp('\\b' + name + '\\b'); - return re.test(el.className); - } - function addClass(el, name){ - if ( ! hasClass(el, name)){ - el.className += ' ' + name; - } - } - function removeClass(el, name){ - var re = new RegExp('\\b' + name + '\\b'); - el.className = el.className.replace(re, ''); - } - - function removeNode(el){ - el.parentNode.removeChild(el); - } - - /** - * Easy styling and uploading - * @constructor - * @param button An element you want convert to - * upload button. Tested dimentions up to 500x500px - * @param {Object} options See defaults below. - */ - window.AjaxUpload = function(button, options){ - this._settings = { - // Location of the server-side upload script - action: 'upload.php', - // File upload name - name: 'userfile', - // Select & upload multiple files at once FF3.6+, Chrome 4+ - multiple: false, - // Additional data to send - data: {}, - // Submit file as soon as it's selected - autoSubmit: true, - // The type of data that you're expecting back from the server. - // html and xml are detected automatically. - // Only useful when you are using json data as a response. - // Set to "json" in that case. - responseType: false, - // Class applied to button when mouse is hovered - hoverClass: 'hover', - // Class applied to button when button is focused - focusClass: 'focus', - // Class applied to button when AU is disabled - disabledClass: 'disabled', - // When user selects a file, useful with autoSubmit disabled - // You can return false to cancel upload - onChange: function(file, extension){ - }, - // Callback to fire before file is uploaded - // You can return false to cancel upload - onSubmit: function(file, extension){ - }, - // Fired when file upload is completed - // WARNING! DO NOT USE "FALSE" STRING AS A RESPONSE! - onComplete: function(file, response){ - } - }; - - // Merge the users options with our defaults - for (var i in options) { - if (options.hasOwnProperty(i)){ - this._settings[i] = options[i]; - } - } - - // button isn't necessary a dom element - if (button.jquery){ - // jQuery object was passed - button = button[0]; - } else if (typeof button == "string") { - if (/^#.*/.test(button)){ - // If jQuery user passes #elementId don't break it - button = button.slice(1); - } - - button = document.getElementById(button); - } - - if ( ! button || button.nodeType !== 1){ - throw new Error("Please make sure that you're passing a valid element"); - } - - if ( button.nodeName.toUpperCase() == 'A'){ - // disable link - addEvent(button, 'click', function(e){ - if (e && e.preventDefault){ - e.preventDefault(); - } else if (window.event){ - window.event.returnValue = false; - } - }); - } - - // DOM element - this._button = button; - // DOM element - this._input = null; - // If disabled clicking on button won't do anything - this._disabled = false; - - // if the button was disabled before refresh if will remain - // disabled in FireFox, let's fix it - this.enable(); - - this._rerouteClicks(); - }; - - // assigning methods to our class - AjaxUpload.prototype = { - setData: function(data){ - this._settings.data = data; - }, - disable: function(){ - addClass(this._button, this._settings.disabledClass); - this._disabled = true; - - var nodeName = this._button.nodeName.toUpperCase(); - if (nodeName == 'INPUT' || nodeName == 'BUTTON'){ - this._button.setAttribute('disabled', 'disabled'); - } - - // hide input - if (this._input){ - if (this._input.parentNode) { - // We use visibility instead of display to fix problem with Safari 4 - // The problem is that the value of input doesn't change if it - // has display none when user selects a file - this._input.parentNode.style.visibility = 'hidden'; - } - } - }, - enable: function(){ - removeClass(this._button, this._settings.disabledClass); - this._button.removeAttribute('disabled'); - this._disabled = false; - - }, - /** - * Creates invisible file input - * that will hover above the button - *
    - */ - _createInput: function(){ - var self = this; - - var input = document.createElement("input"); - input.setAttribute('type', 'file'); - input.setAttribute('name', this._settings.name); - if(this._settings.multiple) input.setAttribute('multiple', 'multiple'); - - addStyles(input, { - 'position' : 'absolute', - // in Opera only 'browse' button - // is clickable and it is located at - // the right side of the input - 'right' : 0, - 'margin' : 0, - 'padding' : 0, - 'fontSize' : '480px', - // in Firefox if font-family is set to - // 'inherit' the input doesn't work - 'fontFamily' : 'sans-serif', - 'cursor' : 'pointer' - }); - - var div = document.createElement("div"); - addStyles(div, { - 'display' : 'block', - 'position' : 'absolute', - 'overflow' : 'hidden', - 'margin' : 0, - 'padding' : 0, - 'opacity' : 0, - // Make sure browse button is in the right side - // in Internet Explorer - 'direction' : 'ltr', - //Max zIndex supported by Opera 9.0-9.2 - 'zIndex': 2147483583 - }); - - // Make sure that element opacity exists. - // Otherwise use IE filter - if ( div.style.opacity !== "0") { - if (typeof(div.filters) == 'undefined'){ - throw new Error('Opacity not supported by the browser'); - } - div.style.filter = "alpha(opacity=0)"; - } - - addEvent(input, 'change', function(){ - - if ( ! input || input.value === ''){ - return; - } - - // Get filename from input, required - // as some browsers have path instead of it - var file = fileFromPath(input.value); - - if (false === self._settings.onChange.call(self, file, getExt(file))){ - self._clearInput(); - return; - } - - // Submit form when value is changed - if (self._settings.autoSubmit) { - self.submit(); - } - }); - - addEvent(input, 'mouseover', function(){ - addClass(self._button, self._settings.hoverClass); - }); - - addEvent(input, 'mouseout', function(){ - removeClass(self._button, self._settings.hoverClass); - removeClass(self._button, self._settings.focusClass); - - if (input.parentNode) { - // We use visibility instead of display to fix problem with Safari 4 - // The problem is that the value of input doesn't change if it - // has display none when user selects a file - input.parentNode.style.visibility = 'hidden'; - } - }); - - addEvent(input, 'focus', function(){ - addClass(self._button, self._settings.focusClass); - }); - - addEvent(input, 'blur', function(){ - removeClass(self._button, self._settings.focusClass); - }); - - div.appendChild(input); - document.body.appendChild(div); - - this._input = input; - }, - _clearInput : function(){ - if (!this._input){ - return; - } - - // this._input.value = ''; Doesn't work in IE6 - removeNode(this._input.parentNode); - this._input = null; - this._createInput(); - - removeClass(this._button, this._settings.hoverClass); - removeClass(this._button, this._settings.focusClass); - }, - /** - * Function makes sure that when user clicks upload button, - * the this._input is clicked instead - */ - _rerouteClicks: function(){ - var self = this; - - // IE will later display 'access denied' error - // if you use using self._input.click() - // other browsers just ignore click() - - addEvent(self._button, 'mouseover', function(){ - if (self._disabled){ - return; - } - - if ( ! self._input){ - self._createInput(); - } - - var div = self._input.parentNode; - copyLayout(self._button, div); - div.style.visibility = 'visible'; - - }); - - - // commented because we now hide input on mouseleave - /** - * When the window is resized the elements - * can be misaligned if button position depends - * on window size - */ - //addResizeEvent(function(){ - // if (self._input){ - // copyLayout(self._button, self._input.parentNode); - // } - //}); - - }, - /** - * Creates iframe with unique name - * @return {Element} iframe - */ - _createIframe: function(){ - // We can't use getTime, because it sometimes return - // same value in safari :( - var id = getUID(); - - // We can't use following code as the name attribute - // won't be properly registered in IE6, and new window - // on form submit will open - // var iframe = document.createElement('iframe'); - // iframe.setAttribute('name', id); - - var iframe = toElement('