Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Drupal.org issue queue
Drupal.org issue queue
Security & Compliance
Security & Compliance
Dependency List
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
project
drupal
Commits
9c16305b
Commit
9c16305b
authored
Jul 02, 2014
by
webchick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2212283
by nod_: Auto-format JS files.
parent
7f555205
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
86 additions
and
71 deletions
+86
-71
core/misc/ajax.js
core/misc/ajax.js
+2
-1
core/misc/autocomplete.js
core/misc/autocomplete.js
+3
-3
core/misc/dialog/dialog.js
core/misc/dialog/dialog.js
+2
-2
core/misc/dialog/dialog.position.js
core/misc/dialog/dialog.position.js
+1
-1
core/misc/dropbutton/dropbutton.js
core/misc/dropbutton/dropbutton.js
+0
-1
core/misc/drupal.js
core/misc/drupal.js
+1
-0
core/misc/form.js
core/misc/form.js
+0
-2
core/misc/progress.js
core/misc/progress.js
+0
-1
core/misc/states.js
core/misc/states.js
+9
-5
core/misc/tabbingmanager.js
core/misc/tabbingmanager.js
+0
-2
core/misc/tabledrag.js
core/misc/tabledrag.js
+2
-0
core/modules/ckeditor/js/ckeditor.admin.js
core/modules/ckeditor/js/ckeditor.admin.js
+8
-8
core/modules/ckeditor/js/ckeditor.stylescombo.admin.js
core/modules/ckeditor/js/ckeditor.stylescombo.admin.js
+3
-2
core/modules/ckeditor/js/plugins/drupalimage/plugin.js
core/modules/ckeditor/js/plugins/drupalimage/plugin.js
+4
-4
core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.js
.../modules/ckeditor/js/plugins/drupalimagecaption/plugin.js
+10
-10
core/modules/ckeditor/js/plugins/drupallink/plugin.js
core/modules/ckeditor/js/plugins/drupallink/plugin.js
+0
-1
core/modules/comment/js/node-new-comments-link.js
core/modules/comment/js/node-new-comments-link.js
+1
-0
core/modules/contextual/js/contextual.js
core/modules/contextual/js/contextual.js
+3
-3
core/modules/contextual/js/toolbar/models/StateModel.js
core/modules/contextual/js/toolbar/models/StateModel.js
+0
-1
core/modules/editor/js/editor.js
core/modules/editor/js/editor.js
+1
-1
core/modules/field_ui/field_ui.js
core/modules/field_ui/field_ui.js
+0
-1
core/modules/file/file.js
core/modules/file/file.js
+2
-2
core/modules/language/language.admin.js
core/modules/language/language.admin.js
+1
-0
core/modules/quickedit/js/editors/formEditor.js
core/modules/quickedit/js/editors/formEditor.js
+3
-3
core/modules/quickedit/js/quickedit.js
core/modules/quickedit/js/quickedit.js
+2
-0
core/modules/quickedit/js/views/AppView.js
core/modules/quickedit/js/views/AppView.js
+1
-1
core/modules/quickedit/js/views/ContextualLinkView.js
core/modules/quickedit/js/views/ContextualLinkView.js
+1
-0
core/modules/simpletest/simpletest.js
core/modules/simpletest/simpletest.js
+1
-0
core/modules/system/system.modules.js
core/modules/system/system.modules.js
+1
-0
core/modules/toolbar/js/toolbar.menu.js
core/modules/toolbar/js/toolbar.menu.js
+6
-0
core/modules/tour/js/tour.js
core/modules/tour/js/tour.js
+3
-3
core/modules/user/user.js
core/modules/user/user.js
+6
-3
core/modules/views_ui/js/views-admin.js
core/modules/views_ui/js/views-admin.js
+2
-3
core/themes/bartik/color/preview.js
core/themes/bartik/color/preview.js
+1
-1
core/themes/seven/js/mobile.install.js
core/themes/seven/js/mobile.install.js
+2
-2
core/themes/seven/js/nav-tabs.js
core/themes/seven/js/nav-tabs.js
+4
-4
No files found.
core/misc/ajax.js
View file @
9c16305b
...
...
@@ -107,7 +107,8 @@
// xmlhttp.responseText is going to throw an exception. So we'll catch it.
try
{
responseText
=
"
\n
"
+
Drupal
.
t
(
"
ResponseText: !responseText
"
,
{
'
!responseText
'
:
$
.
trim
(
xmlhttp
.
responseText
)
});
}
catch
(
e
)
{}
}
catch
(
e
)
{}
// Make the responseText more readable by stripping HTML tags and newlines.
responseText
=
responseText
.
replace
(
/<
(
"
[^
"
]
*"|'
[^
'
]
*'|
[^
'">
])
*>/gi
,
""
);
...
...
core/misc/autocomplete.js
View file @
9c16305b
...
...
@@ -162,10 +162,10 @@
*
* @return {Object}
*/
function
renderItem
(
ul
,
item
)
{
function
renderItem
(
ul
,
item
)
{
return
$
(
"
<li>
"
)
.
append
(
$
(
"
<a>
"
).
html
(
item
.
label
))
.
appendTo
(
ul
);
.
append
(
$
(
"
<a>
"
).
html
(
item
.
label
))
.
appendTo
(
ul
);
}
/**
...
...
core/misc/dialog/dialog.js
View file @
9c16305b
...
...
@@ -27,7 +27,7 @@
Drupal
.
dialog
=
function
(
element
,
options
)
{
function
openDialog
(
settings
)
{
function
openDialog
(
settings
)
{
settings
=
$
.
extend
({},
drupalSettings
.
dialog
,
options
,
settings
);
// Trigger a global event to allow scripts to bind events to the dialog.
$
(
window
).
trigger
(
'
dialog:beforecreate
'
,
[
dialog
,
$element
,
settings
]);
...
...
@@ -36,7 +36,7 @@
$
(
window
).
trigger
(
'
dialog:aftercreate
'
,
[
dialog
,
$element
,
settings
]);
}
function
closeDialog
(
value
)
{
function
closeDialog
(
value
)
{
$
(
window
).
trigger
(
'
dialog:beforeclose
'
,
[
dialog
,
$element
]);
$element
.
dialog
(
'
close
'
);
dialog
.
returnValue
=
value
;
...
...
core/misc/dialog/dialog.position.js
View file @
9c16305b
...
...
@@ -62,7 +62,7 @@
'
dialog:aftercreate
'
:
function
(
event
,
dialog
,
$element
,
settings
)
{
var
autoResize
=
debounce
(
resetSize
,
20
);
var
eventData
=
{
settings
:
settings
,
$element
:
$element
};
if
(
settings
.
autoResize
===
true
||
settings
.
autoResize
===
'
true
'
)
{
if
(
settings
.
autoResize
===
true
||
settings
.
autoResize
===
'
true
'
)
{
$element
.
dialog
(
'
option
'
,
{
resizable
:
false
,
draggable
:
false
})
.
dialog
(
'
widget
'
).
css
(
'
position
'
,
'
fixed
'
);
...
...
core/misc/dropbutton/dropbutton.js
View file @
9c16305b
...
...
@@ -144,7 +144,6 @@
}
});
$
.
extend
(
Drupal
.
theme
,
{
/**
* A toggle is an interactive element often bound to a click handler.
...
...
core/misc/drupal.js
View file @
9c16305b
...
...
@@ -37,6 +37,7 @@ if (window.jQuery) {
}
this
.
message
=
messageList
.
join
(
'
;
'
);
}
DrupalBehaviorError
.
prototype
=
new
Error
();
/**
...
...
core/misc/form.js
View file @
9c16305b
...
...
@@ -116,7 +116,6 @@
}
};
/**
* Sends a 'formUpdated' event each time a form element is modified.
*/
...
...
@@ -149,7 +148,6 @@
var
contextIsForm
=
$context
.
is
(
'
form
'
);
var
$forms
=
(
contextIsForm
?
$context
:
$context
.
find
(
'
form
'
)).
once
(
'
form-updated
'
);
if
(
$forms
.
length
)
{
// Initialize form behaviors, use $.makeArray to be able to use native
// forEach array method and have the callback parameters in the right order.
...
...
core/misc/progress.js
View file @
9c16305b
...
...
@@ -109,5 +109,4 @@
}
});
})(
jQuery
);
core/misc/states.js
View file @
9c16305b
...
...
@@ -428,7 +428,6 @@
}
};
/**
* A state object is used for describing the state and performing aliasing.
*/
...
...
@@ -552,23 +551,28 @@
}
});
/**
* These are helper functions implementing addition "operators" and don't
* implement any logic that is particular to states.
*/
// Bitwise AND with a third undefined state.
/**
* Bitwise AND with a third undefined state.
*/
function
ternary
(
a
,
b
)
{
return
typeof
a
===
'
undefined
'
?
b
:
(
typeof
b
===
'
undefined
'
?
a
:
a
&&
b
);
}
// Inverts a (if it's not undefined) when invertState is true.
/**
* Inverts a (if it's not undefined) when invertState is true.
*/
function
invert
(
a
,
invertState
)
{
return
(
invertState
&&
typeof
a
!==
'
undefined
'
)
?
!
a
:
a
;
}
// Compares two values while ignoring undefined values.
/**
* Compares two values while ignoring undefined values.
*/
function
compare
(
a
,
b
)
{
return
(
a
===
b
)
?
(
typeof
a
===
'
undefined
'
?
a
:
true
)
:
(
typeof
a
===
'
undefined
'
||
typeof
b
===
'
undefined
'
);
}
...
...
core/misc/tabbingmanager.js
View file @
9c16305b
...
...
@@ -280,7 +280,6 @@
}
});
// Mark this behavior as processed on the first pass and return if it is
// already processed.
if
(
Drupal
.
tabbingManager
)
{
...
...
@@ -288,5 +287,4 @@
}
Drupal
.
tabbingManager
=
new
TabbingManager
();
}(
jQuery
,
Drupal
));
core/misc/tabledrag.js
View file @
9c16305b
...
...
@@ -994,6 +994,7 @@
var
currentRow
=
$
(
this
.
element
,
this
.
table
).
next
(
'
tr.draggable
'
);
var
rows
=
[];
var
child
=
0
;
function
rowIndentation
(
el
,
indentNum
)
{
var
self
=
$
(
el
);
if
(
child
===
1
&&
(
indentNum
===
parentIndentation
))
{
...
...
@@ -1006,6 +1007,7 @@
self
.
addClass
(
'
tree-child-horizontal
'
);
}
}
while
(
currentRow
.
length
)
{
// A greater indentation indicates this is a child.
if
(
currentRow
.
find
(
'
.indentation
'
).
length
>
parentIndentation
)
{
...
...
core/modules/ckeditor/js/ckeditor.admin.js
View file @
9c16305b
...
...
@@ -532,7 +532,7 @@
* A jQuery DOM fragment that represents the new button group. It has
* not been added to the DOM yet.
*/
function
insertNewGroup
(
success
,
$group
)
{
function
insertNewGroup
(
success
,
$group
)
{
if
(
success
)
{
$group
.
appendTo
(
$
(
event
.
currentTarget
).
closest
(
'
.ckeditor-row
'
).
children
(
'
.ckeditor-toolbar-groups
'
));
// Focus on the new group.
...
...
@@ -1171,7 +1171,7 @@
* A callback to invoke after the button group naming modal dialog has been
* closed.
*/
function
registerButtonMove
(
view
,
$button
,
callback
)
{
function
registerButtonMove
(
view
,
$button
,
callback
)
{
var
$group
=
$button
.
closest
(
'
.ckeditor-toolbar-group
'
);
// If dropped in a placeholder button group, the user must name it.
...
...
@@ -1201,7 +1201,7 @@
* @param jQuery $group
* A jQuery set that contains an li element that wraps a group of buttons.
*/
function
registerGroupMove
(
view
,
$group
)
{
function
registerGroupMove
(
view
,
$group
)
{
// Remove placeholder classes if necessary.
var
$row
=
$group
.
closest
(
'
.ckeditor-row
'
);
if
(
$row
.
hasClass
(
'
placeholder
'
))
{
...
...
@@ -1229,7 +1229,7 @@
* A callback to invoke after the button group naming modal dialog has been
* closed.
*/
function
openGroupNameDialog
(
view
,
$group
,
callback
)
{
function
openGroupNameDialog
(
view
,
$group
,
callback
)
{
callback
=
callback
||
function
()
{};
/**
...
...
@@ -1241,7 +1241,7 @@
* @return Boolean
* Returns true when an error exists, otherwise returns false.
*/
function
validateForm
(
form
)
{
function
validateForm
(
form
)
{
if
(
form
.
elements
[
0
].
value
.
length
===
0
)
{
var
$form
=
$
(
form
);
if
(
!
$form
.
hasClass
(
'
errors
'
))
{
...
...
@@ -1266,12 +1266,12 @@
* The form DOM element that contains the input with the new button group
* title string.
*/
function
closeDialog
(
action
,
form
)
{
function
closeDialog
(
action
,
form
)
{
/**
* Closes the dialog when the user cancels or supplies valid data.
*/
function
shutdown
()
{
function
shutdown
()
{
dialog
.
close
(
action
);
// The processing marker can be deleted since the dialog has been closed.
...
...
@@ -1286,7 +1286,7 @@
* @param String name
* The new name of the CKEditor button group.
*/
function
namePlaceholderGroup
(
$group
,
name
)
{
function
namePlaceholderGroup
(
$group
,
name
)
{
// If it's currently still a placeholder, then that means we're creating
// a new group, and we must do some extra work.
if
(
$group
.
hasClass
(
'
placeholder
'
))
{
...
...
core/modules/ckeditor/js/ckeditor.stylescombo.admin.js
View file @
9c16305b
...
...
@@ -30,12 +30,13 @@
var
stylesSet
=
that
.
_generateStylesSetSetting
(
styles
);
if
(
!
_
.
isEqual
(
previousStylesSet
,
stylesSet
))
{
previousStylesSet
=
stylesSet
;
$ckeditorActiveToolbar
.
trigger
(
'
CKEditorPluginSettingsChanged
'
,
[{
stylesSet
:
stylesSet
}]);
$ckeditorActiveToolbar
.
trigger
(
'
CKEditorPluginSettingsChanged
'
,
[
{
stylesSet
:
stylesSet
}
]);
}
});
},
/**
* Builds the "stylesSet" configuration part of the CKEditor JS settings.
*
...
...
core/modules/ckeditor/js/plugins/drupalimage/plugin.js
View file @
9c16305b
...
...
@@ -80,7 +80,7 @@
widgetDefinition
.
_dataToDialogValues
=
function
(
data
)
{
var
dialogValues
=
{};
var
map
=
widgetDefinition
.
_mapDataToDialog
;
Object
.
keys
(
widgetDefinition
.
_mapDataToDialog
).
forEach
(
function
(
key
)
{
Object
.
keys
(
widgetDefinition
.
_mapDataToDialog
).
forEach
(
function
(
key
)
{
dialogValues
[
map
[
key
]]
=
data
[
key
];
});
return
dialogValues
;
...
...
@@ -90,7 +90,7 @@
widgetDefinition
.
_dialogValuesToData
=
function
(
dialogReturnValues
)
{
var
data
=
{};
var
map
=
widgetDefinition
.
_mapDataToDialog
;
Object
.
keys
(
widgetDefinition
.
_mapDataToDialog
).
forEach
(
function
(
key
)
{
Object
.
keys
(
widgetDefinition
.
_mapDataToDialog
).
forEach
(
function
(
key
)
{
if
(
dialogReturnValues
.
hasOwnProperty
(
map
[
key
]))
{
data
[
key
]
=
dialogReturnValues
[
map
[
key
]];
}
...
...
@@ -177,7 +177,7 @@
editor
.
addCommand
(
'
editdrupalimage
'
,
{
allowedContent
:
'
img[alt,!src,width,height,!data-editor-file-uuid]
'
,
requiredContent
:
'
img[alt,src,width,height,data-editor-file-uuid]
'
,
modes
:
{
wysiwyg
:
1
},
modes
:
{
wysiwyg
:
1
},
canUndo
:
true
,
exec
:
function
(
editor
,
data
)
{
var
dialogSettings
=
{
...
...
@@ -234,7 +234,7 @@
});
function
isImageWidget
(
editor
,
element
)
{
function
isImageWidget
(
editor
,
element
)
{
var
widget
=
editor
.
widgets
.
getByElement
(
element
.
getChild
(
0
),
true
);
return
widget
&&
widget
.
name
===
'
image
'
;
}
...
...
core/modules/ckeditor/js/plugins/drupalimagecaption/plugin.js
View file @
9c16305b
...
...
@@ -58,10 +58,10 @@
// attributes.
widgetDefinition
.
downcast
=
function
(
element
)
{
// Find an image element in the one being downcasted (can be itself).
var
img
=
findElementByName
(
element
,
'
img
'
)
,
caption
=
this
.
editables
.
caption
,
captionHtml
=
caption
&&
caption
.
getData
(),
attrs
=
img
.
attributes
;
var
img
=
findElementByName
(
element
,
'
img
'
)
;
var
caption
=
this
.
editables
.
caption
;
var
captionHtml
=
caption
&&
caption
.
getData
();
var
attrs
=
img
.
attributes
;
// If image contains a non-empty caption, serialize caption to the
// data-caption attribute.
...
...
@@ -91,8 +91,8 @@
return
;
}
var
attrs
=
element
.
attributes
,
retElement
=
element
;
var
attrs
=
element
.
attributes
;
var
retElement
=
element
;
// We won't need the attributes during editing: we'll use widget.data
// to store them (except the caption, which is stored in the DOM).
...
...
@@ -107,9 +107,9 @@
// Captioned image will be transformed to <figure>, so we don't want
// the <p> anymore.
if
(
element
.
parent
.
name
===
'
p
'
&&
caption
)
{
var
index
=
element
.
getIndex
()
,
splitBefore
=
index
>
0
,
splitAfter
=
index
+
1
<
element
.
parent
.
children
.
length
;
var
index
=
element
.
getIndex
()
;
var
splitBefore
=
index
>
0
;
var
splitAfter
=
index
+
1
<
element
.
parent
.
children
.
length
;
if
(
splitBefore
)
{
element
.
parent
.
split
(
index
);
...
...
@@ -203,7 +203,7 @@
* @param String name
* @return CKEDITOR.htmlParser.element
*/
function
findElementByName
(
element
,
name
)
{
function
findElementByName
(
element
,
name
)
{
if
(
element
.
name
===
name
)
{
return
element
;
}
...
...
core/modules/ckeditor/js/plugins/drupallink/plugin.js
View file @
9c16305b
...
...
@@ -192,7 +192,6 @@
}
});
/**
* Get the surrounding link element of current selection.
*
...
...
core/modules/comment/js/node-new-comments-link.js
View file @
9c16305b
...
...
@@ -113,6 +113,7 @@
}
}
}
if
(
drupalSettings
.
comment
&&
drupalSettings
.
comment
.
newCommentsLinks
)
{
render
(
drupalSettings
.
comment
.
newCommentsLinks
.
node
[
fieldName
]);
}
...
...
core/modules/contextual/js/contextual.js
View file @
9c16305b
...
...
@@ -41,7 +41,7 @@
* @param string html
* The server-side rendered HTML for this contextual link.
*/
function
initContextual
(
$contextual
,
html
)
{
function
initContextual
(
$contextual
,
html
)
{
var
$region
=
$contextual
.
closest
(
'
.contextual-region
'
);
var
contextual
=
Drupal
.
contextual
;
...
...
@@ -101,7 +101,7 @@
* A contextual links placeholder DOM element, containing the actual
* contextual links as rendered by the server.
*/
function
adjustIfNestedAndOverlapping
(
$contextual
)
{
function
adjustIfNestedAndOverlapping
(
$contextual
)
{
var
$contextuals
=
$contextual
// @todo confirm that .closest() is not sufficient
.
parents
(
'
.contextual-region
'
).
eq
(
-
1
)
...
...
@@ -156,7 +156,7 @@
});
// Update all contextual links placeholders whose HTML is cached.
var
uncachedIDs
=
_
.
filter
(
ids
,
function
initIfCached
(
contextualID
)
{
var
uncachedIDs
=
_
.
filter
(
ids
,
function
initIfCached
(
contextualID
)
{
var
html
=
storage
.
getItem
(
'
Drupal.contextual.
'
+
contextualID
);
if
(
html
!==
null
)
{
// Initialize after the current executation cycle, to make the AJAX
...
...
core/modules/contextual/js/toolbar/models/StateModel.js
View file @
9c16305b
...
...
@@ -25,7 +25,6 @@
tabbingContext
:
null
},
/**
* {@inheritdoc}
*
...
...
core/modules/editor/js/editor.js
View file @
9c16305b
...
...
@@ -259,7 +259,7 @@
* A callback to be called (with no parameters) after the field's value has
* been XSS filtered.
*/
function
filterXssWhenSwitching
(
field
,
format
,
originalFormatID
,
callback
)
{
function
filterXssWhenSwitching
(
field
,
format
,
originalFormatID
,
callback
)
{
// A text editor that already is XSS-safe needs no additional measures.
if
(
format
.
editor
.
isXssSafe
)
{
callback
(
field
,
format
);
...
...
core/modules/field_ui/field_ui.js
View file @
9c16305b
...
...
@@ -166,7 +166,6 @@
}
};
/**
* Row handlers for the 'Manage display' screen.
*/
...
...
core/modules/file/file.js
View file @
9c16305b
...
...
@@ -19,7 +19,7 @@
var
$context
=
$
(
context
);
var
elements
;
function
initFileValidation
(
selector
)
{
function
initFileValidation
(
selector
)
{
$context
.
find
(
selector
)
.
once
(
'
fileValidate
'
)
.
on
(
'
change.fileValidate
'
,
{
extensions
:
elements
[
selector
]
},
Drupal
.
file
.
validateExtension
);
...
...
@@ -34,7 +34,7 @@
var
$context
=
$
(
context
);
var
elements
;
function
removeFileValidation
(
selector
)
{
function
removeFileValidation
(
selector
)
{
$context
.
find
(
selector
)
.
removeOnce
(
'
fileValidate
'
)
.
off
(
'
change.fileValidate
'
,
Drupal
.
file
.
validateExtension
);
...
...
core/modules/language/language.admin.js
View file @
9c16305b
...
...
@@ -18,6 +18,7 @@
.
find
(
'
table, .tabledrag-toggle-weight
'
)
.
toggle
(
$checkbox
.
prop
(
'
checked
'
));
}
// Bind hide/show and rearrange customization checkboxes.
$configForm
.
once
(
'
negotiation-language-admin-bind
'
).
on
(
'
change
'
,
inputSelector
,
function
(
event
)
{
toggleTable
(
event
.
target
);
...
...
core/modules/quickedit/js/editors/formEditor.js
View file @
9c16305b
...
...
@@ -70,9 +70,9 @@
// Render form container.
var
$formContainer
=
this
.
$formContainer
=
$
(
Drupal
.
theme
(
'
quickeditFormContainer
'
,
{
id
:
id
,
loadingMsg
:
Drupal
.
t
(
'
Loading…
'
)
}
id
:
id
,
loadingMsg
:
Drupal
.
t
(
'
Loading…
'
)
}
));
$formContainer
.
find
(
'
.quickedit-form
'
)
...
...
core/modules/quickedit/js/quickedit.js
View file @
9c16305b
...
...
@@ -563,6 +563,7 @@
function
hasOtherRegion
(
contextualLink
)
{
return
contextualLink
.
region
!==
entityElement
;
}
contextualLinksQueue
=
_
.
filter
(
contextualLinksQueue
,
hasOtherRegion
);
});
...
...
@@ -576,6 +577,7 @@
function
hasOtherFieldElement
(
field
)
{
return
field
.
el
!==
fieldElement
;
}
fieldsMetadataQueue
=
_
.
filter
(
fieldsMetadataQueue
,
hasOtherFieldElement
);
fieldsAvailableQueue
=
_
.
filter
(
fieldsAvailableQueue
,
hasOtherFieldElement
);
});
...
...
core/modules/quickedit/js/views/AppView.js
View file @
9c16305b
...
...
@@ -325,7 +325,7 @@
var
that
=
this
;
var
discardDialog
;
function
closeDiscardDialog
(
action
)
{
function
closeDiscardDialog
(
action
)
{
discardDialog
.
close
(
action
);
// The active modal has been removed.
that
.
model
.
set
(
'
activeModal
'
,
null
);
...
...
core/modules/quickedit/js/views/ContextualLinkView.js
View file @
9c16305b
...
...
@@ -15,6 +15,7 @@
event
.
preventDefault
();
event
.
target
.
click
();
}
return
{
'
click a
'
:
function
(
event
)
{
event
.
preventDefault
();
...
...
core/modules/simpletest/simpletest.js
View file @
9c16305b
...
...
@@ -52,6 +52,7 @@
});
$groupCheckbox
.
prop
(
'
checked
'
,
allChecked
);
}
$testCheckboxes
.
on
(
'
change
'
,
updateGroupCheckbox
);
});
}
...
...
core/modules/system/system.modules.js
View file @
9c16305b
...
...
@@ -18,6 +18,7 @@
var
$table
=
$
(
$input
.
attr
(
'
data-table
'
));
var
$rowsAndDetails
,
$rows
,
$details
;
var
searching
=
false
;
function
hidePackageDetails
(
index
,
element
)
{
var
$packDetails
=
$
(
element
);
var
$visibleRows
=
$packDetails
.
find
(
'
table:not(.sticky-header)
'
).
find
(
'
tbody tr:visible
'
);
...
...
core/modules/toolbar/js/toolbar.menu.js
View file @
9c16305b
...
...
@@ -20,6 +20,7 @@
'
handleOpen
'
:
Drupal
.
t
(
'
Extend
'
),
'
handleClose
'
:
Drupal
.
t
(
'
Collapse
'
)
};
/**
* Handle clicks from the disclosure button on an item with sub-items.
*
...
...
@@ -35,6 +36,7 @@
var
$openItems
=
$item
.
siblings
().
filter
(
'
.open
'
);
toggleList
(
$openItems
,
false
);
}
/**
* Toggle the open/close state of a list is a menu.
*
...
...
@@ -58,6 +60,7 @@
// Expand Structure, Collapse Structure
.
text
((
switcher
)
?
ui
.
handleClose
:
ui
.
handleOpen
);
}
/**
* Add markup to the menu elements.
*
...
...
@@ -88,6 +91,7 @@
}
});
}
/**
* Adds a level class to each list based on its depth in the menu.
*
...
...
@@ -108,6 +112,7 @@
markListLevels
(
$lists
,
level
+
1
);
}
}
/**
* On page load, open the active menu item.
*
...
...
@@ -128,6 +133,7 @@
toggleList
(
$activeTrail
,
true
);
}
}
// Bind event handlers.
$
(
document
)
.
on
(
'
click.toolbar
'
,
'
.toolbar-handle
'
,
toggleClickHandler
);
...
...
core/modules/tour/js/tour.js
View file @
9c16305b
...
...
@@ -103,9 +103,9 @@
if
(
$tour
.
find
(
'
li
'
).
length
)
{
$tour
.
joyride
({
postRideCallback
:
function
()
{
that
.
model
.
set
(
'
isActive
'
,
false
);
},
template
:
{
// HTML segments for tip layout
link
:
'
<a href=
\
"#close
\
" class=
\
"joyride-close-tip
\
">×</a>
'
,
button
:
'
<a href=
\
"#
\
" class=
\
"button button--primary joyride-next-tip
\
"></a>
'
template
:
{
// HTML segments for tip layout
link
:
'
<a href=
\
"#close
\
" class=
\
"joyride-close-tip
\
">×</a>
'
,
button
:
'
<a href=
\
"#
\
" class=
\
"button button--primary joyride-next-tip
\
"></a>
'
}
});
this
.
model
.
set
({
isActive
:
true
,
activeTour
:
$tour
});
...
...
core/modules/user/user.js
View file @
9c16305b
...
...
@@ -153,13 +153,16 @@
if
(
strength
<
60
)
{
indicatorText
=
translate
.
weak
;
indicatorColor
=
'
#bb5555
'
;
}
else
if
(
strength
<
70
)
{
}
else
if
(
strength
<
70
)
{
indicatorText
=
translate
.
fair
;
indicatorColor
=
'
#bbbb55
'
;
}
else
if
(
strength
<
80
)
{
}
else
if
(
strength
<
80
)
{
indicatorText
=
translate
.
good
;
indicatorColor
=
'
#4863a0
'
;
}
else
if
(
strength
<=
100
)
{
}
else
if
(
strength
<=
100
)
{
indicatorText
=
translate
.
strong
;
indicatorColor
=
'
#47c965
'
;
}
...
...
core/modules/views_ui/js/views-admin.js
View file @
9c16305b
...
...
@@ -141,7 +141,7 @@
_populate
:
function
()
{
var
transliterated
=
this
.
getTransliterated
();
var
suffix
=
this
.
suffix
;
this
.
target
.
each
(
function
(
i
)
{
this
.
target
.
each
(
function
(
i
)
{
// Ensure that the maxlength is not exceeded by prepopulating the field.
var
maxlength
=
$
(
this
).
attr
(
'
maxlength
'
)
-
suffix
.
length
;
$
(
this
).
val
(
transliterated
.
substr
(
0
,
maxlength
)
+
suffix
);
...
...
@@ -165,7 +165,6 @@
}
});
Drupal
.
behaviors
.
addItemForm
=
{
attach
:
function
(
context
)
{
var
$context
=
$
(
context
);
...
...
@@ -764,7 +763,6 @@
}
});
/**
* Add a select all checkbox, which checks each checkbox at once.
*/
...
...
@@ -835,6 +833,7 @@
$
(
'
input.default-radios
'
).
show
();
}
}
// Update on widget change.
$
(
'
input[name="options[group_info][multiple]"]
'
)
.
on
(
'
change
'
,
changeDefaultWidget
)
...
...
core/themes/bartik/color/preview.js
View file @
9c16305b
...
...
@@ -8,7 +8,7 @@
Drupal
.
color
=
{
logoChanged
:
false
,
callback
:
function
(
context
,
settings
,
form
,
farb
,
height
,
width
)
{
callback
:
function
(
context
,
settings
,
form
,
farb
,
height
,
width
)
{
// Change the logo to be the real one.
if
(
!
this
.
logoChanged
)
{
$
(
'
#preview #preview-logo img
'
).
attr
(
'
src
'
,
drupalSettings
.
color
.
logo
);
...
...
core/themes/seven/js/mobile.install.js
View file @
9c16305b
...
...
@@ -2,7 +2,7 @@
"
use strict
"
;
function
findActiveStep
(
steps
)
{
function
findActiveStep
(
steps
)
{
for
(
var
i
=
0
;
i
<
steps
.
length
;
i
++
)
{
if
(
steps
[
i
].
className
===
'
active
'
)
{
return
i
+
1
;
...
...
@@ -15,7 +15,7 @@
return
0
;
}
function
installStepsSetup
()
{
function
installStepsSetup
()
{
var
steps
=
document
.
querySelectorAll
(
'
.task-list li
'
);
if
(
steps
.
length
)
{
var
header
=
document
.
querySelector
(
'
header[role="banner"]
'
);
...
...
core/themes/seven/js/nav-tabs.js
View file @
9c16305b
...
...
@@ -11,20 +11,20 @@
"
use strict
"
;
function
init
(
i
,
tab
)
{
function
init
(
i
,
tab
)
{
var
$tab
=
$
(
tab
);
var
$target
=
$tab
.
find
(
'
[data-drupal-nav-tabs-target]
'
);
var
isCollapsible
=
$tab
.
hasClass
(
'
is-collapsible
'
);
function
openMenu
(
e
)
{
function
openMenu
(
e
)
{
$target
.
toggleClass
(
'
is-open
'
);
}
function
handleResize
(
e
)
{
function
handleResize
(
e
)
{
$tab
.
addClass
(
'
is-horizontal
'
);
var
isHorizontal
=
$tab
.
parent
().
width
()
>
$tab
.
intrinsic
(
'
width
'
);
$tab
.
toggleClass
(
'
is-horizontal
'
,
isHorizontal
);
if
(
isCollapsible
)
{
if
(
isCollapsible
)
{
$tab
.
toggleClass
(
'
is-collapse-enabled
'
,
!
isHorizontal
);
}
if
(
isHorizontal
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment