Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bhavesh Jadav 35 posts 144 karma points
    Apr 07, 2016 @ 13:04
    Bhavesh Jadav
    0

    Set image name in alt textbox field by default

    Hi,

    Is it possible to set image name in alt textbox field by default on the Media enter image description herePicker?

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Apr 07, 2016 @ 14:17
    Dennis Adolfi
    2

    File: /Umbraco/Js/umbraco.controller.js

    Line: 3414 (Umbraco v.7.4.2, if not same in your version, search.)

    Add this line:

    $scope.target.altText = image.name;
    

    Code:

    enter image description here

    Result:

    enter image description here

    Remember to restart application or change something in the web.config if changes does´nt show.

  • Michaël Vanbrabandt 863 posts 3348 karma points c-trib
    Apr 07, 2016 @ 14:26
    Michaël Vanbrabandt
    0

    Hi Dennis,

    what will happen if you upgrade to a new version of umbraco? Will this rule be removed again?

    /Michael

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Apr 07, 2016 @ 14:29
    Dennis Adolfi
    0

    Hi Michael.

    Yes, it will. You'll have to remember to add this line again.

  • Bhavesh Jadav 35 posts 144 karma points
    Apr 08, 2016 @ 08:43
    Bhavesh Jadav
    0

    Hi Dennis,

    I have add below line in /Umbraco/Js/umbraco.controller.js

    $scope.target.altText = image.name;

    Umbraco Version 7.3.0

    Also restart application & make changes in webconfig file but still it's not working

    Please help

  • Bjarne Fyrstenborg 1284 posts 4038 karma points MVP 8x c-trib
    Apr 08, 2016 @ 08:55
    Bjarne Fyrstenborg
    101

    Hi Bhavesh

    Also ensure to increase client depency version number in /Config/ClientDependency.config

    <clientDependency version="1" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
    

    Whatever number it has in version attribute, then increase it at least by 1. Furthermore you should also clear browser cache.

    If you use Chrome you can install this extension to make it easier to clear the cache (on client side). https://chrome.google.com/webstore/detail/clear-cache/cppjkneekbjaeellbfkmgnhonkkjfpdn

    /Bjarne

  • Bhavesh Jadav 35 posts 144 karma points
    Apr 08, 2016 @ 09:29
    Bhavesh Jadav
    0

    Thank you so much..

    it's working now by increase version.........

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Apr 08, 2016 @ 09:52
    Dennis Adolfi
    0

    You´re welcome....

  • Dennis Adolfi 1082 posts 6449 karma points MVP 6x c-trib
    Apr 08, 2016 @ 09:11
    Dennis Adolfi
    0

    Hi Bhavesh.

    Add this line:1251 (Umbraco 7.3.0) to:

    $scope.target.altText = image.name;
    

    And yes, bumb de clientdependancy version number. Worked for me on 7.3.0

    enter image description here

Please Sign in or register to post replies

Write your reply to:

Draft