Skip to content

Commit

Permalink
Patch over pull request Semantic-Org#1156 to solve an issue with the …
Browse files Browse the repository at this point in the history
…form behavior

With this fix one needs to explicitely define:
$.fn.form = require('semantic-ui/npm/modules/behavior/form');
  • Loading branch information
davide committed Oct 25, 2014
1 parent 577f644 commit f5777c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,19 +594,24 @@ module.exports = function(grunt) {
replace: {
npm: {
options: {
preserveOrder: true,
patterns: [
{
match: /\$\.fn\.\w+\s*=\s*function\(parameters\)\s*{/g,
replacement: 'module.exports = function(parameters) {\n var _module = module;\n'
},
{
match: /\$\.fn\.\w+\.settings/g,
replacement: '_module.exports.settings'
match: /\$\.fn\.\w+\s*=\s*function\(fields, parameters\)\s*{/g,
replacement: 'module.exports = function(fields, parameters) {\n var _module = module;\n'
},
{
match: /\$\.fn\.\w+\.settings\s*=/g,
replacement: 'module.exports.settings ='
},
{
match: /\$\.fn\.\w+\.settings/g,
replacement: '_module.exports.settings'
},
{
match: /jQuery/g,
replacement: 'require("jquery")'
Expand Down
4 changes: 3 additions & 1 deletion npm/modules/behavior/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@

;(function ( $, window, document, undefined ) {

$.fn.form = function(fields, parameters) {
module.exports = function(fields, parameters) {
var _module = module;

var
$allModules = $(this),

Expand Down

0 comments on commit f5777c1

Please sign in to comment.