Permalink
Browse files

Remove CoffeeScript files.

  • Loading branch information...
1 parent dbdcf6a commit feb488e2953bcf919ce0a07146bae23b4245e275 @mgsisk committed Jun 30, 2015
Showing with 0 additions and 663 deletions.
  1. +0 −106 _/coffee/customize-controls.coffee
  2. +0 −502 _/coffee/customize.coffee
  3. +0 −24 _/coffee/script.coffee
  4. +0 −31 _/coffee/templates.coffee
@@ -1,106 +0,0 @@
-##
-# Handle unique customization controls.
-#
-# @package Inkblot
-##
-
-(($)->
- ##
- # Toggle control visibility.
- #
- # @param string settingId
- # @param object o
- ##
- inkblot_toggle_controls = (settingId, object)->
- wp.customize(settingId, (setting)->
- $.each(object.controls, (index, controlId)->
- wp.customize.control(controlId, (control)->
- visibility = (to)->
- control.container.toggle(object.callback(to))
-
- visibility(setting.get())
- setting.bind(visibility)
- )
- )
- )
-
- $.each(
- content:
- controls: ['sidebar1_width']
- callback: (to)->
- return 'one-column' isnt to
- page_background_image:
- controls: ['page_background_repeat', 'page_background_position_x', 'page_background_attachment']
- callback: (to)->
- return !! to
- trim_background_image:
- controls: ['trim_background_repeat', 'trim_background_position_x', 'trim_background_attachment']
- callback: (to)->
- return !! to
- , (settingId, object)->
- inkblot_toggle_controls(settingId, object)
- )
-
- $.each(
- content:
- controls: ['sidebar2_width']
- callback: (to)->
- return (-1 isnt to.indexOf('three') or -1 isnt to.indexOf('four'))
- , (settingId, object)->
- inkblot_toggle_controls(settingId, object)
- )
-
- $.each(
- content:
- controls: ['sidebar3_width']
- callback: (to)->
- return (-1 isnt to.indexOf('four'))
- , (settingId, object)->
- inkblot_toggle_controls(settingId, object)
- )
-
- ##
- # Update options on scheme change.
- ##
- $(document).on('change', '#customize-control-scheme input[name="_customize-radio-scheme"]', ->
- $.each($('wbr.inkblot-scheme.' + $(@).val()).data(), (index, value)->
- index = index.replace(/([A-Z])/g, (string)->
- return '_' + string.toLowerCase()
- )
-
- if undefined isnt wp.customize(index)
- wp.customize(index).set(value)
-
- if -1 < index.indexOf('color')
- wp.customize.control(index).container.find('.color-picker-hex')
- .data('data-default-color', value)
- .wpColorPicker('defaultColor', value)
- )
- )
-
- # @todo remove this ugly kludge
-
- $(document).on('click', ->
- $.each([
- 'primary-sidebar',
- 'secondary-sidebar',
- 'tertiary-sidebar',
- 'document-header',
- 'document-footer',
- 'site-header',
- 'site-footer',
- 'page-header',
- 'page-footer',
- 'content-header',
- 'content-footer',
- 'comment-header',
- 'comment-footer',
- 'webcomic-header',
- 'webcomic-footer',
- 'webcomic-navigation-header',
- 'webcomic-navigation-footer'
- ], (index, value)->
- $('#customize-control-sidebar-' + value + '-columns').show()
- )
- )
-)(jQuery)
Oops, something went wrong.

0 comments on commit feb488e

Please sign in to comment.