Basic control binding for inline use - You will need to override the liveCallback or commitCallback function to retrieve results
353529
function(e)
              {
                e.preventDefault();
                e.stopPropagation();
                color.active.val('ahex', $(this).attr('title') || null, e.target);
                return false;
              }
1140808
private void SetResultsFromScript(InteractiveObject interactiveObjectFinal, Bindings localBindings) {
        // A SCRIPT can have mutliple defined objects, so we don't use getDefinedItem()
        // instead we go through the field values
        try {
            ScriptObject scriptObject = interactiveObjectFinal.getScriptObject();
            for (ScriptObject.Field fieldNode : scriptObject.getFieldsArrayList()) {
                if ((scriptObject.getFieldAccessType(fieldNode) == ScriptObject.AccessType.OUTPUT_ONLY) ||
                        (scriptObject.getFieldAccessType(fieldNode) == ScriptObject.AccessType.INPUT_OUTPUT)) {
                    String fieldType = scriptObject.getFieldType(fieldNode);
                    DefinedItem scriptObjectToDefinedItem = scriptObject.getToDefinedItem(fieldNode);
                    EventUtility scriptObjectToEventUtility = scriptObject.getToEventUtility(fieldNode);
                    Object returnedJavaScriptValue = localBindings.get(scriptObject.getFieldName(fieldNode));

                    // Script fields contain all the values that can be returned from a JavaScript function.
                    // However, not all JavaScript functions set returned-values, and thus left null.  For
                    // example the initialize() method may not set some Script field values, so don't
                    // process those and thus check if returnedJavaScriptValue != null
                    if ((returnedJavaScriptValue != null) && ( !(returnedJavaScriptValue instanceof V8Object) )) {
                        if (fieldType.equalsIgnoreCase("SFBool")) {
                            SFBool sfBool = (SFBool) returnedJavaScriptValue;
                            if ( scriptObjectToDefinedItem != null) {
                                if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                    GVRComponent gvrComponent = scriptObjectToDefinedItem.getGVRSceneObject().getComponent(
                                            GVRLight.getComponentType());
                                    if (gvrComponent != null) {
                                        gvrComponent.setEnable(sfBool.getValue());
                                    }
                                }  //  end if the SceneObject has a light component attached
                            }  //  end scriptObjectToDefinedItem != null
                            else if ( scriptObjectToEventUtility != null) {
                                scriptObjectToEventUtility.setToggle(sfBool.getValue());
                            }
                            else if ( scriptObject.getToTimeSensor(fieldNode) != null) {
                                TimeSensor timeSensor = scriptObject.getToTimeSensor(fieldNode);
                                if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "loop") ) {
                                    timeSensor.setLoop( sfBool.getValue(), gvrContext );
                                }
                                if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "enabled") ) {
                                    timeSensor.setEnabled( sfBool.getValue(), gvrContext );
                                }
                            }
                            else {
                                Log.e(TAG, "Error: Not setting SFBool '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFBool
                        else if (fieldType.equalsIgnoreCase("SFFloat")) {
                            SFFloat sfFloat = (SFFloat) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRMaterial() != null) {
                                GVRMaterial gvrMaterial= scriptObjectToDefinedItem.getGVRMaterial();
                                // shininess and transparency are part of X3D Material node
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "shininess") ) {
                                    gvrMaterial.setSpecularExponent(sfFloat.getValue());
                                } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "transparency") ) {
                                    gvrMaterial.setOpacity(sfFloat.getValue());
                                }
                                else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "rotation")  ) {
                                    // rotationn is part of TextureTransform node
                                    scriptObjectToDefinedItem.setTextureRotation( sfFloat.getValue() );

                                    Matrix3f textureTransform = SetTextureTransformMatrix(
                                            scriptObjectToDefinedItem.getTextureTranslation(),
                                            scriptObjectToDefinedItem.getTextureCenter(),
                                            scriptObjectToDefinedItem.getTextureScale(),
                                            scriptObjectToDefinedItem.getTextureRotation());

                                    float[] texMtx = new float[9];
                                    textureTransform.get(texMtx);
                                    gvrMaterial.setFloatArray("texture_matrix", texMtx);
                                }
                                else {
                                    Log.e(TAG, "Error: Not setting SFFloat to Material '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                                }
                            } else if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                GVRComponent gvrComponent = scriptObjectToDefinedItem.getGVRSceneObject().getComponent(
                                        GVRLight.getComponentType());
                                if (gvrComponent != null) {
                                    if (gvrComponent instanceof GVRSpotLight) {
                                        GVRSpotLight gvrSpotLightBase = (GVRSpotLight) gvrComponent;
                                        if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "beamWidth") ) {
                                            gvrSpotLightBase.setInnerConeAngle(sfFloat.getValue() * 180 / (float) Math.PI);
                                        } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "cutOffAngle") ) {
                                            gvrSpotLightBase.setOuterConeAngle(sfFloat.getValue() * 180 / (float) Math.PI);
                                        } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "intensity") ) {
                                            //TODO: we aren't changing intensity since this would be multiplied by color
                                        } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "radius") ) {
                                            //TODO: radius is not currently supported in GearVR for the spot light
                                        }
                                    } else if (gvrComponent instanceof GVRPointLight) {
                                        GVRPointLight gvrPointLightBase = (GVRPointLight) gvrComponent;
                                        if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "intensity") ) {
                                            //TODO: we aren't changing intensity since this would be multiplied by color
                                        } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "radius") ) {
                                            //TODO: radius is not currently supported in GearVR for the point light
                                        }
                                    } else if (gvrComponent instanceof GVRDirectLight) {
                                        GVRDirectLight gvrDirectLightBase = (GVRDirectLight) gvrComponent;
                                        if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "intensity") ) {
                                            //TODO: we aren't changing intensity since GVR multiplies this by color
                                        }
                                    }
                                }  //  end presumed to be a light
                            }  //  end GVRScriptObject ! null
                            else if ( scriptObjectToDefinedItem.getGVRVideoSceneObject() != null) {
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "speed") ||
                                        StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "pitch") ) {
                                    GVRVideoSceneObjectPlayer gvrVideoSceneObjectPlayer = scriptObjectToDefinedItem.getGVRVideoSceneObject().getMediaPlayer();
                                    ExoPlayer exoPlayer = (ExoPlayer) gvrVideoSceneObjectPlayer.getPlayer();

                                    PlaybackParameters currPlaybackParamters = exoPlayer.getPlaybackParameters();
                                    PlaybackParameters playbackParamters = new PlaybackParameters(sfFloat.getValue(), sfFloat.getValue());
                                    exoPlayer.setPlaybackParameters(playbackParamters);
                                }
                            }
                            else {
                                Log.e(TAG, "Error: Not setting SFFloat '" + scriptObject.getToDefinedItemField(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFFloat
                        else if (fieldType.equalsIgnoreCase("SFTime")) {
                            SFTime sfTime = (SFTime) returnedJavaScriptValue;
                            if ( scriptObject.getToTimeSensor(fieldNode) != null) {
                                TimeSensor timeSensor = scriptObject.getToTimeSensor(fieldNode);
                                if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "startTime") ) {
                                    timeSensor.startTime = (float)sfTime.getValue();
                                }
                                else if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "stopTime") ) {
                                    timeSensor.stopTime = (float)sfTime.getValue();
                                }
                                else if ( StringFieldMatch( scriptObject.getFieldName(fieldNode), "cycleInterval") ) {
                                    timeSensor.setCycleInterval( (float)sfTime.getValue() );
                                }
                                else Log.e(TAG, "Error: Not setting " + (float)sfTime.getValue() + " to SFTime '" +
                                            scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                            else if ( scriptObject.getToDefinedItemField( fieldNode ) != null) {
                                DefinedItem definedItem = scriptObject.getToDefinedItem(fieldNode);
                                if ( definedItem.getGVRVideoSceneObject() != null ) {
                                    GVRVideoSceneObjectPlayer gvrVideoSceneObjectPlayer = scriptObjectToDefinedItem.getGVRVideoSceneObject().getMediaPlayer();
                                    ExoPlayer exoPlayer = (ExoPlayer) gvrVideoSceneObjectPlayer.getPlayer();
                                    if (StringFieldMatch(scriptObject.getToDefinedItemField(fieldNode), "startTime")) {
                                        exoPlayer.seekTo( (long)sfTime.getValue() );
                                    }
                                    else Log.e(TAG, "Error: MovieTexture " + scriptObject.getToDefinedItemField(fieldNode) + " in " +
                                            scriptObject.getName() + " script not supported." );
                                }
                                else Log.e(TAG, "Error: Not setting " + (float)sfTime.getValue() + " to SFTime. " +
                                        "MovieTexture node may not be defined to connect from SCRIPT '" + scriptObject.getName() + "'." );

                            }
                            else Log.e(TAG, "Error: Not setting SFTime '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                        }  //  end SFTime
                        else if (fieldType.equalsIgnoreCase("SFColor")) {
                            SFColor sfColor = (SFColor) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRMaterial() != null) {
                                //  SFColor change to a GVRMaterial
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "diffuseColor") ) {
                                    scriptObjectToDefinedItem.getGVRMaterial().setVec4("diffuse_color", sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1.0f);
                                } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "specularColor") ) {
                                    scriptObjectToDefinedItem.getGVRMaterial().setVec4("specular_color", sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1.0f);
                                } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "emissiveColor") ) {
                                    scriptObjectToDefinedItem.getGVRMaterial().setVec4("emissive_color", sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1.0f);
                                }
                            }  //  end SFColor change to a GVRMaterial
                            else if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                // GVRSceneObject
                                GVRSceneObject gvrSceneObject = scriptObjectToDefinedItem.getGVRSceneObject();
                                GVRComponent gvrComponent = gvrSceneObject.getComponent(GVRLight.getComponentType());
                                if (gvrComponent != null) {
                                    if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "color") ) {
                                        // SFColor change to a GVRSceneObject (likely a Light Component)
                                        if (gvrComponent instanceof GVRSpotLight) {
                                            GVRSpotLight gvrSpotLightBase = (GVRSpotLight) gvrComponent;
                                            gvrSpotLightBase.setDiffuseIntensity(sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1);
                                        } else if (gvrComponent instanceof GVRPointLight) {
                                            GVRPointLight gvrPointLightBase = (GVRPointLight) gvrComponent;
                                            gvrPointLightBase.setDiffuseIntensity(sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1);
                                        } else if (gvrComponent instanceof GVRDirectLight) {
                                            GVRDirectLight gvrDirectLightBase = (GVRDirectLight) gvrComponent;
                                            gvrDirectLightBase.setDiffuseIntensity(sfColor.getRed(), sfColor.getGreen(), sfColor.getBlue(), 1);
                                        }
                                    }
                                }
                            }  //  SFColor change to a GVRSceneObject (likely a Light)
                            else {
                                Log.e(TAG, "Error: Not setting SFColor '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFColor (to a light or Material)
                        else if (fieldType.equalsIgnoreCase("SFVec3f")) {
                            SFVec3f sfVec3f = (SFVec3f) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                //  SFVec3f change to a GVRSceneObject
                                GVRSceneObject gvrSceneObject = scriptObjectToDefinedItem.getGVRSceneObject();
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "translation")  ||
                                        StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "location") ) {
                                    // location applies to point light and spot light
                                    GVRSceneObject gvrSceneObjectTranslation = root
                                            .getSceneObjectByName((scriptObjectToDefinedItem.getGVRSceneObject().getName() + x3dObject.TRANSFORM_TRANSLATION_));
                                    if (gvrSceneObjectTranslation != null)
                                        gvrSceneObjectTranslation.getTransform().setPosition(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                    else
                                        gvrSceneObject.getTransform().setPosition(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "scale") ) {
                                    GVRSceneObject gvrSceneObjectScale = root
                                            .getSceneObjectByName((scriptObjectToDefinedItem.getGVRSceneObject().getName() + x3dObject.TRANSFORM_SCALE_));
                                    if (gvrSceneObjectScale != null)
                                        gvrSceneObjectScale.getTransform().setScale(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                    else
                                        gvrSceneObject.getTransform().setScale(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                } else {
                                    // could be parameters for a light
                                    GVRComponent gvrComponent = gvrSceneObject.getComponent(
                                            GVRLight.getComponentType());
                                    if (gvrComponent != null) {
                                        if (gvrComponent instanceof GVRSpotLight) {
                                            GVRSpotLight gvrSpotLightBase = (GVRSpotLight) gvrComponent;
                                            if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "attenuation") ) {
                                                gvrSpotLightBase.setAttenuation(sfVec3f.getX(), sfVec3f.getY(), sfVec3f.getZ());
                                            } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "direction") ) {
                                                scriptObjectToDefinedItem.setDirection(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                                Vector3f v3 = new Vector3f(sfVec3f).normalize();
                                                Quaternionf q = ConvertDirectionalVectorToQuaternion(v3);
                                                gvrSpotLightBase.getTransform().setRotation(q.w, q.x, q.y, q.z);
                                            } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "location") ) {
                                                gvrSpotLightBase.getTransform().setPosition(sfVec3f.getX(), sfVec3f.getY(), sfVec3f.getZ());
                                            }
                                        } else if (gvrComponent instanceof GVRPointLight) {
                                            GVRPointLight gvrPointLightBase = (GVRPointLight) gvrComponent;
                                            if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "attenuation") ) {
                                                gvrPointLightBase.setAttenuation(sfVec3f.getX(), sfVec3f.getY(), sfVec3f.getZ());
                                            } else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "location") ) {
                                                gvrPointLightBase.getTransform().setPosition(sfVec3f.getX(), sfVec3f.getY(), sfVec3f.getZ());
                                            }
                                        } else if (gvrComponent instanceof GVRDirectLight) {
                                            GVRDirectLight gvrDirectLightBase = (GVRDirectLight) gvrComponent;
                                            if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "direction") ) {
                                                scriptObjectToDefinedItem.setDirection(sfVec3f.x, sfVec3f.y, sfVec3f.z);
                                                Vector3f v3 = new Vector3f(sfVec3f).normalize();
                                                Quaternionf q = ConvertDirectionalVectorToQuaternion(v3);
                                                gvrDirectLightBase.getTransform().setRotation(q.w, q.x, q.y, q.z);
                                            }
                                        }
                                    }
                                }  // end it could be a light
                            }  // end GVRSceneObject with SFVec3f
                            else {
                                Log.e(TAG, "Error: Not setting SFVec3f '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFVec3f
                        else if (fieldType.equalsIgnoreCase("SFVec2f")) {
                            SFVec2f sfVec2f = (SFVec2f) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRMaterial() != null) {
                                //  SFVec2f change to a Texture Transform
                                GVRMaterial gvrMaterial= scriptObjectToDefinedItem.getGVRMaterial();
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "translation")  ||
                                        StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "scale")  ||
                                        StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "center")  ) {

                                    if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "translation")  )
                                        scriptObjectToDefinedItem.setTextureTranslation(sfVec2f.getX(), -sfVec2f.getY());
                                    else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "scale")  )
                                        scriptObjectToDefinedItem.setTextureScale( sfVec2f.getX(), sfVec2f.getY() );
                                    else if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "center")  )
                                        scriptObjectToDefinedItem.setTextureCenter( -sfVec2f.getX(), sfVec2f.getY());


                                    Matrix3f textureTransform = SetTextureTransformMatrix(
                                            scriptObjectToDefinedItem.getTextureTranslation(),
                                            scriptObjectToDefinedItem.getTextureCenter(),
                                            scriptObjectToDefinedItem.getTextureScale(),
                                            scriptObjectToDefinedItem.getTextureRotation());
                                    float[] texMtx = new float[9];
                                    textureTransform.get(texMtx);
                                    gvrMaterial.setFloatArray("texture_matrix", texMtx);
                                }

                                else {
                                    Log.e(TAG, "Error: Not setting SFVec2f '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                                }
                            }
                            else {
                                Log.e(TAG, "Error: Not setting SFVec2f '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        } // end SFVec2f
                        else if (fieldType.equalsIgnoreCase("SFRotation")) {
                            SFRotation sfRotation = (SFRotation) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                //  SFRotation change to a GVRSceneObject
                                if ( StringFieldMatch( scriptObject.getToDefinedItemField(fieldNode), "rotation") ) {
                                    scriptObjectToDefinedItem.setAxisAngle(sfRotation.angle, sfRotation.x, sfRotation.y, sfRotation.z);

                                    GVRSceneObject gvrSceneObjectRotation = root
                                            .getSceneObjectByName((scriptObjectToDefinedItem.getGVRSceneObject().getName() + x3dObject.TRANSFORM_ROTATION_));
                                    float angleDegrees = (float) Math.toDegrees(sfRotation.angle);  // convert radians to degrees
                                    if (gvrSceneObjectRotation != null) {
                                        gvrSceneObjectRotation.getTransform().setRotationByAxis(angleDegrees, sfRotation.x, sfRotation.y, sfRotation.z);
                                    } else {
                                        scriptObjectToDefinedItem.getGVRSceneObject().getTransform().setRotationByAxis(sfRotation.angle, sfRotation.x, sfRotation.y, sfRotation.z);
                                    }
                                }  //  definedItem != null
                            }  // end GVRSceneObject with SFRotation
                            else {
                                Log.e(TAG, "Error: Not setting SFRotation '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFRotation
                        else if (fieldType.equalsIgnoreCase("SFInt32")) {
                            try {
                                SFInt32 sfInt32 = new SFInt32(new Integer(returnedJavaScriptValue.toString()).intValue() );
                                if (scriptObjectToDefinedItem.getGVRSceneObject() != null) {
                                    // Check if the field is 'whichChoice', meaning it's a Switch node
                                    if ( StringFieldMatch(scriptObject.getToDefinedItemField(fieldNode), "whichChoice") ) {
                                        GVRSceneObject gvrSwitchSceneObject = scriptObject.getToDefinedItem(fieldNode).getGVRSceneObject();
                                        GVRComponent gvrComponent = gvrSwitchSceneObject.getComponent(GVRSwitch.getComponentType());
                                        if (gvrComponent instanceof GVRSwitch) {
                                            // Set the value inside the Switch node
                                            GVRSwitch gvrSwitch = (GVRSwitch) gvrComponent;
                                            // Check if we are to switch to a value out of range (i.e. no mesh exists)
                                            // and thus set to not show any object.
                                            if ( (gvrSwitchSceneObject.getChildrenCount() <= sfInt32.getValue()) ||
                                                    (sfInt32.getValue() < 0) ) {
                                                sfInt32.setValue( gvrSwitchSceneObject.getChildrenCount() );
                                            }
                                            gvrSwitch.setSwitchIndex( sfInt32.getValue() );
                                        }
                                    }
                                }  // end GVRSceneObject with SFInt32
                                else {
                                    Log.e(TAG, "Error: Not setting SFInt32 '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'.");
                                }
                            }
                            catch (Exception e) {
                                Log.e(TAG, "Error: Not setting SFInt32 '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT " + scriptObject.getName() + "'.");
                                Log.e(TAG, "Exception: " + e);
                            }
                        }  //  end SFInt32
                        else if (fieldType.equalsIgnoreCase("SFString")) {
                            SFString sfString = (SFString) returnedJavaScriptValue;
                            if (scriptObjectToDefinedItem.getGVRTextViewSceneObject() != null) {
                                GVRTextViewSceneObject gvrTextViewSceneObject = scriptObjectToDefinedItem.getGVRTextViewSceneObject();
                                if (scriptObject.getToDefinedItemField(fieldNode).endsWith("style")) {
                                    String value = sfString.getValue().toUpperCase();
                                    GVRTextViewSceneObject.fontStyleTypes fontStyle = null;
                                    if ( value.equals("BOLD")) fontStyle = GVRTextViewSceneObject.fontStyleTypes.BOLD;
                                    else if ( value.equals("ITALIC")) fontStyle = GVRTextViewSceneObject.fontStyleTypes.ITALIC;
                                    else if ( value.equals("BOLDITALIC")) fontStyle = GVRTextViewSceneObject.fontStyleTypes.BOLDITALIC;
                                    else if ( value.equals("PLAIN")) fontStyle = GVRTextViewSceneObject.fontStyleTypes.PLAIN;
                                    if ( fontStyle != null ) {
                                        gvrTextViewSceneObject.setTypeface(gvrContext,
                                                gvrTextViewSceneObject.getFontFamily(), fontStyle);
                                    }
                                    else {
                                        Log.e(TAG, "Error: " + value + " + not recognized X3D FontStyle style in SCRIPT '" + scriptObject.getName() + "'." );
                                    }
                                }
                                else Log.e(TAG, "Error: Setting not SFString  value'" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                            else {
                                Log.e(TAG, "Error: Not setting SFString '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end SFString
                        else if (fieldType.equalsIgnoreCase("MFString")) {
                            MFString mfString = (MFString) returnedJavaScriptValue;

                            if (scriptObjectToDefinedItem.getGVRTexture() != null) {
                                GVRTexture gvrTexture = scriptObjectToDefinedItem.getGVRTexture();
                                //  MFString change to a GVRTexture object
                                if (StringFieldMatch(scriptObject.getToDefinedItemField(fieldNode), "url")) {
                                    if (scriptObjectToDefinedItem.getGVRMaterial() != null) {
                                        // We have the GVRMaterial that contains a GVRTexture
                                        if (!gvrTexture.getImage().getFileName().equals(mfString.get1Value(0))) {
                                            // Only loadTexture if it is different than the current
                                            GVRAssetLoader.TextureRequest request = new GVRAssetLoader.TextureRequest(assetRequest,
                                                    gvrTexture, mfString.get1Value(0));
                                            assetRequest.loadTexture(request);
                                        }
                                    } // end having GVRMaterial containing GVRTexture
                                    else {
                                        Log.e(TAG, "Error: No GVRMaterial associated with MFString Texture url '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'.");
                                    }
                                }  //  definedItem != null
                                else {
                                    Log.e(TAG, "Error: No url associated with MFString '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'.");
                                }
                            }  // end GVRTexture != null

                            else if (scriptObjectToDefinedItem.getGVRVideoSceneObject() != null) {
                                //  MFString change to a GVRVideoSceneObject object
                                if (StringFieldMatch(scriptObject.getToDefinedItemField(fieldNode), "url")) {
                                    try {
                                        GVRVideoSceneObjectPlayer gvrVideoSceneObjectPlayer = scriptObjectToDefinedItem.getGVRVideoSceneObject().getMediaPlayer();
                                        ExoPlayer exoPlayer = (ExoPlayer) gvrVideoSceneObjectPlayer.getPlayer();
                                        exoPlayer.stop();

                                        final DataSource.Factory dataSourceFactory = new DataSource.Factory() {
                                            @Override
                                            public DataSource createDataSource() {
                                                return new AssetDataSource(gvrContext.getContext());
                                            }
                                        };
                                        final MediaSource mediaSource = new ExtractorMediaSource(Uri.parse("asset:///" + mfString.get1Value(0)),
                                                dataSourceFactory,
                                                new DefaultExtractorsFactory(), null, null);
                                        exoPlayer.prepare(mediaSource);
                                        Log.e(TAG, "Load movie " + mfString.get1Value(0) + ".");
                                        gvrVideoSceneObjectPlayer.start();
                                    } catch (Exception e) {
                                        Log.e(TAG, "X3D MovieTexture Asset " + mfString.get1Value(0) + " not loaded." + e);
                                        e.printStackTrace();
                                    }

                                }  //  end definedItem != null, contains url
                                else {
                                    Log.e(TAG, "Error: No MovieTexure url associated with MFString '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                                }
                            }  // end GVRVideoSceneObject != null

                            if (scriptObjectToDefinedItem.getGVRTextViewSceneObject() != null) {
                                GVRTextViewSceneObject gvrTextViewSceneObject = scriptObjectToDefinedItem.getGVRTextViewSceneObject();
                                if (scriptObject.getToDefinedItemField(fieldNode).equalsIgnoreCase("string")) {
                                    gvrTextViewSceneObject.setText(mfString.get1Value(0));
                                }
                                else Log.e(TAG, "Error: Setting not MFString string '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "'." );
                            }
                        }  //  end MFString
                        else {
                            Log.e(TAG, "Error: " + fieldType + " in '" + scriptObject.getFieldName(fieldNode) + "' value from SCRIPT '" + scriptObject.getName() + "' not supported." );
                        }
                    }  //  end value != null
                    else {
                        Log.e(TAG, "Warning: " + fieldType + " '" + scriptObject.getFieldName(fieldNode) + "' from SCRIPT '" + scriptObject.getName() + "' may not be set.");
                    }
                }  //  end OUTPUT-ONLY or INPUT_OUTPUT
            }  // end for-loop list of fields for a single script
        } catch (Exception e) {
            Log.e(TAG, "Error setting values returned from JavaScript in SCRIPT '" +
                    interactiveObjectFinal.getScriptObject().getName() +
                    "'. Check JavaScript or ROUTE's.  Exception: " + e);

        }
    }
84782
function InlineColorEditor(color, marker) {
        this._color = color;
        this._marker = marker;
        this._isOwnChange = false;
        this._isHostChange = false;
        this._origin = "+InlineColorEditor_" + (lastOriginId++);

        this._handleColorChange = this._handleColorChange.bind(this);
        this._handleHostDocumentChange = this._handleHostDocumentChange.bind(this);

        InlineWidget.call(this);
    }
175623
function addBindings() {
		function clickHandler(e) {
			// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
			// See: http://jacklmoore.com/notes/click-events/
			if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
				e.preventDefault();
				launch(this);
			}
		}

		if ($box) {
			if (!init) {
				init = true;

				// Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
				$next.click(function () {
					publicMethod.next();
				});
				$prev.click(function () {
					publicMethod.prev();
				});
				$close.click(function () {
					publicMethod.close();
				});
				$overlay.click(function () {
					if (settings.overlayClose) {
						publicMethod.close();
					}
				});
				
				// Key Bindings
				$(document).bind('keydown.' + prefix, function (e) {
					var key = e.keyCode;
					if (open && settings.escKey && key === 27) {
						e.preventDefault();
						publicMethod.close();
					}
					if (open && settings.arrowKey && $related[1] && !e.altKey) {
						if (key === 37) {
							e.preventDefault();
							$prev.click();
						} else if (key === 39) {
							e.preventDefault();
							$next.click();
						}
					}
				});

				if ($.isFunction($.fn.on)) {
					// For jQuery 1.7+
					$(document).on('click.'+prefix, '.'+boxElement, clickHandler);
				} else {
					// For jQuery 1.3.x -> 1.6.x
					// This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
					// This is not here for jQuery 1.9, it's here for legacy users.
					$('.'+boxElement).live('click.'+prefix, clickHandler);
				}
			}
			return true;
		}
		return false;
	}
251931
function() {
    var value = this.get();

    // Don't call the callback if `skipNextSync` was called on the observer
    if (this.skip || !this.callback) {
      this.skip = false;

      if (this.getChangeRecords) {
        // Store an immutable version of the value, allowing for arrays and objects to change instance but not content and
        // still refrain from dispatching callbacks (e.g. when using an object in bind-class or when using array formatters
        // in bind-each)
        this.oldValue = diff.clone(value);
      } else {
        this.oldValue = value;
      }
    } else {
      var change;
      var useCompareBy = this.getChangeRecords &&
                         this.compareBy &&
                         Array.isArray(value) &&
                         Array.isArray(this.oldValue);

      if (useCompareBy) {
        var compareExpression = this.compareBy;
        var name = this.compareByName;
        var index = this.compareByIndex || '__index__';
        var ctx = this.context;
        var globals = this.observations.globals;
        var formatters = this.observations.formatters;
        var oldValue = this.oldValue;
        if (!name) {
          name = '__item__';
          // Turn "id" into "__item__.id"
          compareExpression = name + '.' + compareExpression;
        }

        var getCompareValue = expressions.parse(compareExpression, globals, formatters, name, index);
        changed = diff.values(value.map(getCompareValue, ctx), oldValue.map(getCompareValue, ctx));
      } else if (this.getChangeRecords) {
        changed = diff.values(value, this.oldValue);
      } else {
        changed = diff.basic(value, this.oldValue);
      }

      var oldValue = this.oldValue;

      if (this.getChangeRecords) {
        // Store an immutable version of the value, allowing for arrays and objects to change instance but not content and
        // still refrain from dispatching callbacks (e.g. when using an object in bind-class or when using array formatters
        // in bind-each)
        this.oldValue = diff.clone(value);
      } else {
        this.oldValue = value;
      }

      // If an array has changed calculate the splices and call the callback.
      if (!changed && !this.forceUpdateNextSync) return;
      this.forceUpdateNextSync = false;
      if (Array.isArray(changed)) {
        this.callback.call(this.callbackContext, value, oldValue, changed);
      } else {
        this.callback.call(this.callbackContext, value, oldValue);
      }
    }
  }
332194
function bindRenderText(boundText, compileNode, view) {
    var /** @type {?} */ valueField = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__compiler_util_binding_util__["a" /* createCheckBindingField */])(view);
    var /** @type {?} */ evalResult = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1__compiler_util_expression_converter__["b" /* convertPropertyBinding */])(view, view, view.componentContext, boundText.value, valueField.bindingId);
    if (!evalResult) {
        return null;
    }
    view.detectChangesRenderPropertiesMethod.resetDebugInfo(compileNode.nodeIndex, boundText);
    view.detectChangesRenderPropertiesMethod.addStmts(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__compiler_util_binding_util__["b" /* createCheckBindingStmt */])(evalResult, valueField.expression, __WEBPACK_IMPORTED_MODULE_9__constants__["g" /* DetectChangesVars */].throwOnChange, [__WEBPACK_IMPORTED_MODULE_6__output_output_ast__["e" /* THIS_EXPR */].prop('renderer')
            .callMethod('setText', [compileNode.renderNode, evalResult.currValExpr])
            .toStmt()]));
}
600654
function (bind, callback) {
                var jsonChangeCallback = null;
                // register as listener for the bindings defined for this control:
                if (bind) {
                    jsonChangeCallback = {
                        fn : callback || this._notifyDataChange,
                        scope : this,
                        args : {
                            tplCtxt : this.tplCtxt,
                            animate : bind.animate
                        }
                    };

                    // addListener throws errors
                    try {
                        // normalize recursive
                        bind.recursive = bind.recursive !== false;
                        this.__json.addListener(bind.inside, bind.to, jsonChangeCallback, true, bind.recursive);
                        // save for disposal
                        this._bindings.push({
                            inside : bind.inside,
                            callback : jsonChangeCallback,
                            to : bind.to,
                            recursive : bind.recursive
                        });
                    } catch (e) {
                        this.$logError(this.SECTION_BINDING_ERROR, [bind.inside, bind.to, this.id,
                                this.tplCtxt.tplClasspath]);
                        jsonChangeCallback = null;
                    }
                    return jsonChangeCallback;
                }
            }
1005244
def inline_query(self):
        """"""
        if isinstance(self.button, types.KeyboardButtonSwitchInline):
            return self.button.query
1010272
function () {
        "use strict";
    
        var events = new Events({'bind': this});
    
        var ready;
        Object.defineProperty(this, 'ready', {
            'get': function () {
                return ready;
            }
        });
    
        var controls = [];
        Object.defineProperty(this, 'list', {
            'get': function () {
                return controls;
            }
        });
    
        this.register = function (register) {
    
            for (var name in register) {
    
                var specs = register[name];
                if (typeof specs === 'string') {
                    specs = {'path': specs};
                }
    
                controls[name] = new Control(name, specs);
    
            }
    
        };
    
        function importControls(controlsToImport, callback) {
    
            var coordinate = new Coordinate(controlsToImport, callback);
    
            for (var i in controlsToImport) {
    
                (function (control) {
    
                    control = controls[control];
                    if (!control) {
                        console.error('Control "' + controlsToImport[i] + '" is not registered.');
                        return;
                    }
    
                    control.load(coordinate[control.name]);
    
                })(controlsToImport[i]);
    
            }
    
        }
    
        this.import = function (controlsToImport, callback) {
    
            if (!ready) {
                this.done(Delegate(importControls, controlsToImport, callback));
                return;
            }
    
            importControls(controlsToImport, callback);
    
        };
    
        var callbacks = [];
        this.done = function (callback) {
    
            if (ready) {
                callback();
                return;
            }
    
            callbacks.push(callback);
    
        };
    
        // Polymer is ready when beyond is ready
        beyond.done(function () {
    
            ready = true;
            events.trigger('ready');
    
            for (var i in callbacks) {
                callbacks[i]();
            }
    
            callbacks = [];
    
        });
    
    }
1039609
function AbstractControl(validator, asyncValidator) {
        this.validator = validator;
        this.asyncValidator = asyncValidator;
        /** @internal */
        this._onCollectionChange = function () { };
        /**
         * A control is `pristine` if the user has not yet changed
         * the value in the UI.
         *
         * @returns True if the user has not yet changed the value in the UI; compare `dirty`.
         * Programmatic changes to a control's value do not mark it dirty.
         */
        this.pristine = true;
        /**
         * True if the control is marked as `touched`.
         *
         * A control is marked `touched` once the user has triggered
         * a `blur` event on it.
         */
        this.touched = false;
        /** @internal */
        this._onDisabledChange = [];
    }
521228
function (navigationInstruction, callbackName, next, ignoreResult) {
        var plan = navigationInstruction.plan;
        var infos = findDeactivatable(plan, callbackName);
        var i = infos.length; // query from inside out
        function inspect(val) {
            if (ignoreResult || shouldContinue(val)) {
                return iterate();
            }
            return next.cancel(val);
        }
        function iterate() {
            if (i--) {
                try {
                    var viewModel = infos[i];
                    var result = viewModel[callbackName](navigationInstruction);
                    return processPotential(result, inspect, next.cancel);
                }
                catch (error) {
                    return next.cancel(error);
                }
            }
            navigationInstruction.router.couldDeactivate = true;
            return next();
        }
        return iterate();
    }
19117
function (control, element, key, path, twoWays, jq, vf, events) {
/*Line 8 - 'AtomBinding.js' */            this.element = element;
/*Line 9 - 'AtomBinding.js' */            this.control = control;
/*Line 10 - 'AtomBinding.js' */            this.vf = vf;
/*Line 11 - 'AtomBinding.js' */            this.key = key;
/*Line 12 - 'AtomBinding.js' */            this.events = events;

/*Line 14 - 'AtomBinding.js' */            if ($.isArray(path)) {
/*Line 15 - 'AtomBinding.js' */                this.pathList = [];
/*Line 16 - 'AtomBinding.js' */                this.path = [];
/*Line 17 - 'AtomBinding.js' */                var ae = new AtomEnumerator(path);
/*Line 18 - 'AtomBinding.js' */                while (ae.next()) {
/*Line 19 - 'AtomBinding.js' */                    var item = ae.current();
/*Line 20 - 'AtomBinding.js' */                    if (!$.isArray(item)) {
/*Line 21 - 'AtomBinding.js' */                        this.path.push({ path: item, value: null });
/*Line 22 - 'AtomBinding.js' */                        continue;
/*Line 23 - 'AtomBinding.js' */                    }
/*Line 24 - 'AtomBinding.js' */                    var pe = new AtomEnumerator(item);
/*Line 25 - 'AtomBinding.js' */                    var p = [];
/*Line 26 - 'AtomBinding.js' */                    while (pe.next()) {
/*Line 27 - 'AtomBinding.js' */                        p.push({ path: pe.current(), value: null });
/*Line 28 - 'AtomBinding.js' */                    }
/*Line 29 - 'AtomBinding.js' */                    this.pathList.push(p);
/*Line 30 - 'AtomBinding.js' */                }
/*Line 31 - 'AtomBinding.js' */                if (this.path.length) {
/*Line 32 - 'AtomBinding.js' */                    this.pathList = null;
/*Line 33 - 'AtomBinding.js' */                } else {
/*Line 34 - 'AtomBinding.js' */                    this.path = null;
/*Line 35 - 'AtomBinding.js' */                }

/*Line 37 - 'AtomBinding.js' */            } else {
/*Line 38 - 'AtomBinding.js' */                var ae = new AtomEnumerator(path.split("."));
/*Line 39 - 'AtomBinding.js' */                this.path = [];
/*Line 40 - 'AtomBinding.js' */                while (ae.next()) {
/*Line 41 - 'AtomBinding.js' */                    this.path.push({ path: ae.current(), value: null });
/*Line 42 - 'AtomBinding.js' */                }
/*Line 43 - 'AtomBinding.js' */            }
/*Line 44 - 'AtomBinding.js' */            this.twoWays = twoWays;
/*Line 45 - 'AtomBinding.js' */            this.jq = jq;
/*Line 46 - 'AtomBinding.js' */            this._isUpdating = false;
/*Line 47 - 'AtomBinding.js' */        }
354647
function (target, settings) {
            // check for settings on the control itself - in namespace 'time:'
            var inlineSettings = null;
            for (var attrName in this._defaults) {
                var attrValue = target.getAttribute('time:' + attrName);
                if (attrValue) {
                    inlineSettings = inlineSettings || {};
                    try {
                        inlineSettings[attrName] = eval(attrValue);
                    } catch (err) {
                        inlineSettings[attrName] = attrValue;
                    }
                }
            }
            var nodeName = target.nodeName.toLowerCase();
            var inline = (nodeName == 'div' || nodeName == 'span');

            if (!target.id) {
                this.uuid += 1;
                target.id = 'tp' + this.uuid;
            }
            var inst = this._newInst($(target), inline);
            inst.settings = $.extend({}, settings || {}, inlineSettings || {});
            if (nodeName == 'input') {
                this._connectTimepicker(target, inst);
                // init inst.hours and inst.minutes from the input value
                this._setTimeFromField(inst);
            } else if (inline) {
                this._inlineTimepicker(target, inst);
            }


        }
71470
function bindDecorators (objectTemplate) {

    // TODO: In what situation would objectTemplate be null and why is it acceptable just to use this as a replacement?
    objectTemplate = objectTemplate || this;

    this.Amorphic = objectTemplate;
    this.amorphicStatic = objectTemplate;

    /**
     * Purpose unknown
     *
     * @param {unknown} target unknown
     * @param {unknown} props unknown
     *
     * @returns {unknown} unknown.
     */
    this.supertypeClass = function supertypeClass(target, props) {
        if (objectTemplate.supertypeClass) {
            return objectTemplate.supertypeClass(target, props, objectTemplate);
        }
        else {
            return SupertypeDefinition.supertypeClass(target, props, objectTemplate);
        }
    };

    /**
     * Purpose unknown
     *
     * @returns {unknown} unknown.
     */
    this.Supertype = function Supertype() {
        if (objectTemplate.Supertype) {
            return objectTemplate.Supertype.call(this, objectTemplate);
        }
        else {
            return SupertypeDefinition.Supertype.call(this, objectTemplate);
        }
    };
    this.Supertype.prototype = SupertypeDefinition.Supertype.prototype;

    /**
     *  Purpose unknown
     *
     * @param {unknown} props unknown
     *
     * @returns {unknown} unknown.
     */
    this.property = function property(props) {
        if (objectTemplate.property) {
            return objectTemplate.property(props, objectTemplate);
        }
        else {
            return SupertypeDefinition.property(props, objectTemplate);
        }
    };

    /**
     * Purpose unknown
     *
     * @param {unknown} defineProperty unknown
     *
     * @returns {unknown} unknown.
     */
    this.remote = function remote(defineProperty) {
        if (objectTemplate.remote) {
            return objectTemplate.remote(defineProperty, objectTemplate);
        }
        else {
            return SupertypeDefinition.remote(defineProperty, objectTemplate);
        }
    };

    /**
     * Purpose unknown
     *
     * @returns {unknown} unknown.
     */
    this.Amorphic.create = function create() {
        objectTemplate.connect = unitTestConfig.startup;

        return objectTemplate;
    };

    this.Amorphic.getInstance = function getInstance() {
        return objectTemplate;
    };
}
1033223
function InlineSearchResultExplorer(registry, commandService, inlineSearchPane, preferences, fileClient, searcher) {
        this.registry = registry;
        this._commandService = commandService;
        this.fileClient = fileClient;
        this.defaulRows = 40;
		this._contentTypeService = new mContentTypes.ContentTypeRegistry(this.registry);
		this._inlineSearchPane = inlineSearchPane;
		this._preferences = preferences;
		this._searcher = searcher;
		this._replaceRenderer =  new SearchResultRenderer({
            checkbox: true,
            highlightSelection: false,
            getCheckedFunc: function(item) {
                return this.getItemChecked(item);
            }.bind(this),
            onCheckedFunc: function(rowId, checked, manually) {
                this.onRowChecked(rowId, checked, manually);
            }.bind(this)
        }, this);
        this.render = this._normalRenderer = new SearchResultRenderer({
            checkbox: false,
            highlightSelection: false
        }, this);
    	mFileDetailRenderer.getPrefs(this._preferences, "/inlineSearchPane", ["showFullPath", "viewByFile", "hidePerfectMatch", "hideNonMatch", "hidePossibleMatch"]).then(function(properties){ //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
    		this._shouldShowFullPath = properties ? properties[0] : false;
    		this._viewByFile = properties ? properties[1] : false;
    		this._matchFilter = {};
    		this._matchFilter["hidePerfectMatch"] = {flag: properties ? properties[2] : false,
    												 filterFunc: function(confidence, hide) {
    												 	return !hide && confidence === 100;
    												 }};
    		this._matchFilter["hideNonMatch"] = {flag: properties ? properties[3] : false,
    												 filterFunc: function(confidence, hide) {
    												 	return !hide && confidence === 0;
    												 }};
    		this._matchFilter["hidePossibleMatch"] = {flag: properties ? properties[4] : false,
    												 filterFunc: function(confidence, hide) {
    												 	return !hide && confidence !== 100 && confidence !== 0;
    												 }};
    		this.declareCommands();
     	}.bind(this));
    }
949959
function doBindStatic(func) {
        /*jshint validthis:true*/
        var args = toArray(arguments),
            bound,
            isAnonymous;

        if (this && !func[$wrapped] && this.$static && this.$static[$class]) {
            func[$anonymous] = true;
            func = wrapMethod(null, func, this.$self || this.$static, true);
            args[0] = func;
            isAnonymous = true;
        }

        args.splice(1, 0, this);
        bound = bind.apply(func, args);
        if (isAnonymous) {
            bound[$anonymous] = func[$anonymous] = true;
        }

        return bound;
    }
1371073
function bind() {
    $.each(actions, function(key, value) {
        $.each(value.eventHandle, function(index, hb) {
            hb.elem.live(hb.event, function(e) {
                var isSend = false;
                if (hb.handle) {
                    isSend = hb.handle(e);
                } else {
                    isSend = true;
                }
                if (isSend) {
                    if (value.before) {
                        value.before($(e.target));
                    }
                    send(value);
                }
            });
        });
    });
    initPjax();
}